Laser Sensing Display for UI interfaces in the real world
Fork of skinGames_forktest by
Diff: myVectorClass.h
- Revision:
- 18:d72935b13858
- Parent:
- 12:0de9cd2bced5
- Child:
- 30:d8af03f01cd4
diff -r 356ca5690a59 -r d72935b13858 myVectorClass.h --- a/myVectorClass.h Sat Apr 28 09:33:49 2012 +0000 +++ b/myVectorClass.h Sat Apr 28 12:35:21 2012 +0000 @@ -402,7 +402,7 @@ // Angle between two vector2Ds: template <class T> inline float vector2D<T>::angleDeg( const vector2D<T>& vec ) const { - return (float)(atan2( x*vec.y-y*vec.x, x*vec.x + y*vec.y )*RAD_TO_DEG); + return (float)(atan2( x*vec.y-y*vec.x, x*vec.x + y*vec.y )*RAD_TO_DEG); } template <class T> @@ -412,7 +412,7 @@ template <class T> inline float vector2D<T>::angleDegHoriz( ) const { - return (float)(atan2( y, x )*RAD_TO_DEG); + return (float)(atan2( y, x )*RAD_TO_DEG+180); // by adding 180, we get values between 0 and 360 (CCW, with 0 on the left quadrant) } //handy typedefs: