--- gimp-2.4.3-/app/display/gimpdisplayshell-coords.c Mon Jan 21 06:22:00 2008 +++ gimp-painter--2.4.3/app/display/gimpdisplayshell-coords.c Tue Jan 22 20:39:07 2008 @@ -277,16 +277,22 @@ gdouble new_y; sin_new = coords->delta_x / coords->distance; + sin_old = shell->last_coords.delta_x / shell->last_coords.distance; + sin_avg = sin (asin (sin_old) * inertia_factor + + asin (sin_new) * (1 - inertia_factor)); + + cos_new = coords->delta_y / coords->distance; cos_old = shell->last_coords.delta_y / shell->last_coords.distance; cos_avg = cos (acos (cos_old) * inertia_factor + acos (cos_new) * (1 - inertia_factor)); + coords->delta_x = sin_avg * coords->distance; coords->delta_y = cos_avg * coords->distance; new_x = (shell->last_coords.x - coords->delta_x) * 0.5 + coords->x * 0.5; new_y = (shell->last_coords.y - coords->delta_y) * 0.5 + coords->y * 0.5; - cur_deviation = SQR (coords->x-new_x) + SQR (coords->y-new_y); + cur_deviation = SQR (coords->x - new_x) + SQR (coords->y - new_y); while (cur_deviation >= max_deviation) {