examples/sphere_hunter: fix another instance of floating point incorrectness
authorStefan Schmidt <stefan@osg.samsung.com>
Wed, 21 Oct 2015 08:26:00 +0000 (10:26 +0200)
committerStefan Schmidt <stefan@osg.samsung.com>
Wed, 21 Oct 2015 09:05:27 +0000 (11:05 +0200)
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

src/examples/sphere_hunter/evas_3d_sphere_hunter.c

index 1307b5f..fe1712e 100644 (file)
@@ -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"))