incorporate the velocity.

2008-07-21  Simon Budig  <simon@gimp.org>

	* app/core/gimpcoords.c: incorporate the velocity.


svn path=/trunk/; revision=26261
This commit is contained in:
Simon Budig
2008-07-21 19:39:35 +00:00
committed by Simon Budig
parent 488f656cd2
commit 3bf754621c

View File

@ -120,7 +120,8 @@ gimp_coords_scalarprod (const GimpCoords *a,
a->pressure * b->pressure +
a->xtilt * b->xtilt +
a->ytilt * b->ytilt +
a->wheel * b->wheel);
a->wheel * b->wheel +
a->velocity * a->velocity);
}
@ -141,6 +142,7 @@ gimp_coords_length_squared (const GimpCoords *a)
upscaled_a.xtilt = a->xtilt * INPUT_RESOLUTION;
upscaled_a.ytilt = a->ytilt * INPUT_RESOLUTION;
upscaled_a.wheel = a->wheel * INPUT_RESOLUTION;
upscaled_a.velocity = a->velocity * INPUT_RESOLUTION;
return gimp_coords_scalarprod (&upscaled_a, &upscaled_a);
}
@ -167,6 +169,7 @@ gimp_coords_manhattan_dist (const GimpCoords *a,
dist += ABS (a->xtilt - b->xtilt);
dist += ABS (a->ytilt - b->ytilt);
dist += ABS (a->wheel - b->wheel);
dist += ABS (a->velocity - b->velocity);
dist *= INPUT_RESOLUTION;
@ -185,5 +188,6 @@ gimp_coords_equal (const GimpCoords *a,
a->pressure == b->pressure &&
a->xtilt == b->xtilt &&
a->ytilt == b->ytilt &&
a->wheel == b->wheel);
a->wheel == b->wheel &&
a->velocity == b->velocity);
}