gimpvector: correct normal vector computing, vector wasn't normilized

This commit is contained in:
Michael Muré 2010-08-14 21:24:59 +02:00
parent 54a9294ea9
commit 7655a45d61
1 changed files with 11 additions and 11 deletions

View File

@ -463,12 +463,12 @@ GimpVector2
gimp_vector2_normal (GimpVector2 *vector)
{
GimpVector2 result;
result.x = vector->y;
result.y = - vector->x;
gimp_vector2_normalize (vector);
result.x = - vector->y;
result.y = vector->x;
gimp_vector2_normalize (&result);
return result;
}
@ -485,12 +485,12 @@ GimpVector2
gimp_vector2_normal_val (GimpVector2 vector)
{
GimpVector2 result;
result.x = vector.y;
result.y = - vector.x;
result.x = - vector.y;
result.y = vector.x;
gimp_vector2_normalize (&result);
return result;
}
/**************************************/