forked from enlightenment/efl
examples/sphere_hunter: make sure we do not loose fractional part of double.
When dividing with an int we would loose the fractional part. Better cast to a double to make clear we want double precision here. CID: 1327343, 1327344
This commit is contained in:
parent
ab2697af29
commit
0a8e616416
|
@ -431,7 +431,7 @@ _key_down(void *data,
|
|||
if (camera_y < 100.0)
|
||||
{
|
||||
camera_y += 0.5;
|
||||
camera_z += 0.5 * (7 / 4);
|
||||
camera_z += 0.5 * (7 / (double)4);
|
||||
}
|
||||
}
|
||||
if (!strcmp(ev->key, "n"))
|
||||
|
@ -598,7 +598,7 @@ _create_cubes(Scene_Data *data, Evas_Real r, int count)
|
|||
Evas_Real d_alpha;
|
||||
|
||||
data->items = NULL;
|
||||
d_alpha = 360 / count;
|
||||
d_alpha = 360 / (double)count;
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue