[clutter] actor: Use CLUTTER_NEARBYINT instead of C integer casting
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] actor: Use CLUTTER_NEARBYINT instead of C integer casting
- Date: Fri, 10 Jul 2015 13:34:29 +0000 (UTC)
commit 3e14d87188dabc6825190c9c3a2f67d5adf8a020
Author: Emmanuele Bassi <ebassi gnome org>
Date: Fri Jul 10 14:33:25 2015 +0100
actor: Use CLUTTER_NEARBYINT instead of C integer casting
Otherwise we break because of rounding.
clutter/clutter-actor.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c
index 1a04312..e01f376 100644
--- a/clutter/clutter-actor.c
+++ b/clutter/clutter-actor.c
@@ -15183,7 +15183,7 @@ clutter_actor_transform_stage_point (ClutterActor *self,
dy2 = v[2].y - v[3].y;
det = DET (dx1, dx2, dy1, dy2);
- if ((int) det == 0)
+ if (CLUTTER_NEARBYINT (det) == 0)
return FALSE;
RQ[0][2] = DET (px, dx2, py, dy2) / det;
@@ -15229,7 +15229,7 @@ clutter_actor_transform_stage_point (ClutterActor *self,
det = (RQ[0][0] * ST[0][0])
+ (RQ[0][1] * ST[0][1])
+ (RQ[0][2] * ST[0][2]);
- if ((int) det == 0)
+ if (CLUTTER_NEARBYINT (det) == 0)
return FALSE;
/*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]