diff options
author | Stefan Schmidt <stefan@osg.samsung.com> | 2015-10-21 10:26:00 +0200 |
---|---|---|
committer | Stefan Schmidt <stefan@osg.samsung.com> | 2015-10-21 11:05:27 +0200 |
commit | 92380c66c893f2375d1de7c3f80f6dc05df5a128 (patch) | |
tree | ae37781fdf0d7f8b8d1e875fd482547c2abd29bf /src/examples | |
parent | 005768796a108522072f5d0ffa80744f078e6539 (diff) | |
download | elementary-92380c66c893f2375d1de7c3f80f6dc05df5a128.tar.gz |
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
Diffstat (limited to 'src/examples')
-rw-r--r-- | src/examples/sphere_hunter/evas_3d_sphere_hunter.c | 4 |
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, if (camera_y > 26.5) { camera_y -= 0.5; - camera_z -= 0.5 * (7 / 4); + camera_z -= 0.5 * (7.0 / 4.0); } } if (!strcmp(ev->key, "Down")) @@ -412,7 +412,7 @@ _key_down(void *data, if (camera_y < 100.0) { camera_y += 0.5; - camera_z += 0.5 * (7 / (double)4); + camera_z += 0.5 * (7.0 / 4.0); } } if (!strcmp(ev->key, "n")) |