gesture: fix it not to lose information by dividing

division of integer by integer results integer.
this patch fix the case to make a division result more precise.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D10039
This commit is contained in:
Wonki Kim 2019-09-20 05:26:41 +00:00 committed by Marcel Hollerbach
parent 659e0fc00c
commit f18201749c
1 changed files with 2 additions and 2 deletions

View File

@ -71,7 +71,7 @@ _zoom_compute(Efl_Canvas_Gesture_Recognizer_Zoom_Data *pd,
Evas_Coord diam = _finger_gap_length_get(xx1, yy1, xx2, yy2,
&x, &y);
zd->radius = diam / 2;
zd->radius = diam / 2.0;
if (!pd->zoom_base)
{
@ -202,7 +202,7 @@ _efl_canvas_gesture_recognizer_zoom_efl_canvas_gesture_recognizer_recognize(Eo *
pd->zoom_st.cur.pos.y,
&x, &y);
zd->radius = pd->zoom_base / 2;
zd->radius = pd->zoom_base / 2.0;
if ((efl_gesture_state_get(gesture) != EFL_GESTURE_STARTED) &&
(efl_gesture_state_get(gesture) != EFL_GESTURE_UPDATED))