Commit 7655a45d authored by Michael Muré's avatar Michael Muré

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

parent 54a9294e
......@@ -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;
}
/**************************************/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment