summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-05-21 23:35:12 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-05-21 23:36:38 +0900
commit668e6091fb4c35835c32c219192cbacad69eaea3 (patch)
tree56bfef0be606a3c84ff0f76be8d05a0e2639c551
parentdde7aefa69721065942434e69a1709d03579ce48 (diff)
eina vector inline header - replace last equal with approx macro
rthis replaces double a == double b with a macro that keeps a close enough range using epsilon (which is the error range for a dobule). this fixes T3245
-rw-r--r--src/lib/eina/eina_inline_vector.x4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/eina/eina_inline_vector.x b/src/lib/eina/eina_inline_vector.x
index 67f2e334fe..939dc9eec3 100644
--- a/src/lib/eina/eina_inline_vector.x
+++ b/src/lib/eina/eina_inline_vector.x
@@ -328,7 +328,9 @@ eina_vector3_homogeneous_position_transform(Eina_Vector3 *out, const Eina_Matrix
328 return; 328 return;
329 } 329 }
330 330
331 if (((m->xw * v->x) + (m->yw * v->y) + (m->zw * v->z) + m->ww) == 0.0) 331 if (EINA_DOUBLE_EQUAL((m->xw * v->x) + (m->yw * v->y) +
332 (m->zw * v->z) + m->ww,
333 0.0))
332 return; 334 return;
333 335
334 tmp.x = (m->xx * v->x) + (m->yx * v->y) + (m->zx * v->z) + m->wx; 336 tmp.x = (m->xx * v->x) + (m->yx * v->y) + (m->zx * v->z) + m->wx;