mirror of https://github.com/GNOME/gimp.git
gimpvector: correct normal vector computing, vector wasn't normilized
This commit is contained in:
parent
54a9294ea9
commit
7655a45d61
|
@ -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;
|
||||
}
|
||||
/**************************************/
|
||||
|
|
Loading…
Reference in New Issue