mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 20:01:11 +00:00
(-rotationAngle): Correct the sign of the angle and wrap it so that it's always >=0 and <=360.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18862 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
5202d04b05
commit
977599e82a
2 changed files with 8 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2004-03-22 02:00 Georg Fleischmann <georg@vhf.de>
|
||||
|
||||
* 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 <alexander@malmberg.org>
|
||||
|
||||
* Source/NSLayoutManager.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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue