X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fvector.cpp;h=53c6bfef4ab0d49e25c5baf0a18bb56569aa86ac;hb=6533354910fbf76d9747deeae02b2e910ef9aa48;hp=23b429902c2b22b892e25f8ab9cbb57813981f4c;hpb=84fc4387b9a6051819da5c9ed688de1ec372c7f7;p=architektonas diff --git a/src/vector.cpp b/src/vector.cpp index 23b4299..53c6bfe 100644 --- a/src/vector.cpp +++ b/src/vector.cpp @@ -214,7 +214,11 @@ double Vector::Angle(void) // quadrant the angle is in... Though, if the y-coordinate of the vector is // negative, that means that the angle is in quadrants III - IV. double rawAngle = acos(Unit().x); +#if 0 double correctedAngle = (y < 0 ? (2.0 * PI) - rawAngle : rawAngle); +#else + double correctedAngle = (y < 0 ? TAU - rawAngle : rawAngle); +#endif return correctedAngle; }