[gtk/wip/baedert/for-master] transform: Compare 3d points directly



commit 9657b63799e458b3fd7cb31eeab13516b7e013f9
Author: Timm Bäder <mail baedert org>
Date:   Sun Jun 7 08:45:35 2020 +0200

    transform: Compare 3d points directly

 gsk/gsktransform.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/gsk/gsktransform.c b/gsk/gsktransform.c
index 79f230c0a1..3b41486a7d 100644
--- a/gsk/gsktransform.c
+++ b/gsk/gsktransform.c
@@ -570,7 +570,9 @@ gsk_translate_transform_equal (GskTransform *first_transform,
   GskTranslateTransform *first = (GskTranslateTransform *) first_transform;
   GskTranslateTransform *second = (GskTranslateTransform *) second_transform;
 
-  return graphene_point3d_equal (&first->point, &second->point);
+  return G_APPROX_VALUE (first->point.x, second->point.x, FLT_EPSILON) &&
+         G_APPROX_VALUE (first->point.y, second->point.y, FLT_EPSILON) &&
+         G_APPROX_VALUE (first->point.z, second->point.z, FLT_EPSILON);
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]