mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 20:40:47 +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
b619ad5bb2
commit
42df7674cd
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>
|
2004-03-22 01:13 Alexander Malmberg <alexander@malmberg.org>
|
||||||
|
|
||||||
* Source/NSLayoutManager.m
|
* Source/NSLayoutManager.m
|
||||||
|
|
|
@ -435,9 +435,10 @@ static NSAffineTransformStruct identityTransform = {
|
||||||
|
|
||||||
- (float) rotationAngle
|
- (float) rotationAngle
|
||||||
{
|
{
|
||||||
/* FIXME - this is not correct in general! */
|
float rotationAngle = atan2(-C, A);
|
||||||
float rotationAngle = atan2(C, A);
|
|
||||||
rotationAngle *= 180.0 / pi;
|
rotationAngle *= 180.0 / pi;
|
||||||
|
if (rotationAngle < 0.0)
|
||||||
|
rotationAngle += 360.0;
|
||||||
|
|
||||||
return rotationAngle;
|
return rotationAngle;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue