marker::directionality_tests::bisection_angle_is_correct_for_more_than_quarter_turn_angle fails on i386
When building librsvg 2.44.10 on i386 on Ubuntu 19.04, that unit test fails:
failures:
---- marker::directionality_tests::bisection_angle_is_correct_for_more_than_quarter_turn_angle stdout ----
thread 'marker::directionality_tests::bisection_angle_is_correct_for_more_than_quarter_turn_angle' panicked at 'assertion
failed: expected.approx_eq(&bisected, 2.0 * PI * f64::EPSILON, 1)', rsvg_internals/src/marker.rs:960:9
failures:
marker::directionality_tests::bisection_angle_is_correct_for_more_than_quarter_turn_angle
test result: FAILED. 167 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out
This is due to a rounding error: bisect_angles()
computes a value that's almost 0 but not quite (-0.00000000000000011102230246251565
), and normalize_angle()
adds to it 2π because the value is < 0.
Note that the same issue affects master.
Edited by Olivier