- Home /
Question by
martygrof3708 · Feb 09, 2020 at 04:08 AM ·
mathangleslopetangent
Why am I not getting an angle in degrees from aTan?
float slope = ( mousePosition.z - mouseStart.z ) / ( mousePosition.x - mouseStart.x );
float degrees = math.atan( slope );
Comment
Best Answer
Answer by Namey5 · Feb 09, 2020 at 08:42 AM
Trigonometric functions operate in radians by default. If you want to find the angle in degrees, you'll need to convert it yourself;
float degrees = math.degrees (math.atan (slope));