diff --git a/ChangeLog b/ChangeLog index 001455ccd..47243b148 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-03-22 02:00 Georg Fleischmann + + * Source/NSAffineTransform.m (-rotationAngle): Correct the sign of + the angle and wrap it so that it's always >=0 and <=360. + 2004-03-22 01:13 Alexander Malmberg * Source/NSLayoutManager.m diff --git a/Source/NSAffineTransform.m b/Source/NSAffineTransform.m index b976cbf0b..4fcec2f4c 100644 --- a/Source/NSAffineTransform.m +++ b/Source/NSAffineTransform.m @@ -435,9 +435,10 @@ static NSAffineTransformStruct identityTransform = { - (float) rotationAngle { - /* FIXME - this is not correct in general! */ - float rotationAngle = atan2(C, A); + float rotationAngle = atan2(-C, A); rotationAngle *= 180.0 / pi; + if (rotationAngle < 0.0) + rotationAngle += 360.0; return rotationAngle; }