Package: librsvg / 2.44.10-2.1

i386-rounding-errors.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Description: fix a rounding error on i386 that would result in a unit test failure
Author: Olivier Tilloy <olivier.tilloy@canonical.com>
Origin: https://gitlab.gnome.org/GNOME/librsvg/commit/aaef7bb37c9f0cceffc3bdf2138ec80242349653

--- a/rsvg_internals/src/marker.rs
+++ b/rsvg_internals/src/marker.rs
@@ -589,7 +589,9 @@ fn find_outgoing_directionality_forwards
 
 // Normalizes an angle to [0.0, 2*PI)
 fn normalize_angle(mut angle: f64) -> f64 {
-    if angle < 0.0 {
+    if angle.abs() < std::f64::EPSILON {
+        angle = angle.abs();
+    } else if angle < 0.0 {
         while angle < 0.0 {
             angle += PI * 2.0;
         }