summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schmidt <stefan@osg.samsung.com>2015-10-21 10:26:00 +0200
committerNicolas Aguirre <aguirre.nicolas@gmail.com>2015-11-12 10:15:03 +0100
commit8e650c8193fb233b8d7d87764d52d22d7488ce72 (patch)
treeae37781fdf0d7f8b8d1e875fd482547c2abd29bf
parentcc882179289834d32bb8e0d1d4d2cf5af45564fc (diff)
examples/sphere_hunter: fix another instance of floating point incorrectness
I missed this one yesterday. Also change it to use floating point values instead of casting which does not make much sense for hard-coded values. CID: 1327343
-rw-r--r--src/examples/sphere_hunter/evas_3d_sphere_hunter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/examples/sphere_hunter/evas_3d_sphere_hunter.c b/src/examples/sphere_hunter/evas_3d_sphere_hunter.c
index 1307b5ff3..fe1712e9e 100644
--- a/src/examples/sphere_hunter/evas_3d_sphere_hunter.c
+++ b/src/examples/sphere_hunter/evas_3d_sphere_hunter.c
@@ -404,7 +404,7 @@ _key_down(void *data,
404 if (camera_y > 26.5) 404 if (camera_y > 26.5)
405 { 405 {
406 camera_y -= 0.5; 406 camera_y -= 0.5;
407 camera_z -= 0.5 * (7 / 4); 407 camera_z -= 0.5 * (7.0 / 4.0);
408 } 408 }
409 } 409 }
410 if (!strcmp(ev->key, "Down")) 410 if (!strcmp(ev->key, "Down"))
@@ -412,7 +412,7 @@ _key_down(void *data,
412 if (camera_y < 100.0) 412 if (camera_y < 100.0)
413 { 413 {
414 camera_y += 0.5; 414 camera_y += 0.5;
415 camera_z += 0.5 * (7 / (double)4); 415 camera_z += 0.5 * (7.0 / 4.0);
416 } 416 }
417 } 417 }
418 if (!strcmp(ev->key, "n")) 418 if (!strcmp(ev->key, "n"))