-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RAD
does not equal one radian
#197
Comments
Does this mean that the value of |
Yes |
(actually, it's probably better to change the name, on the outside case that the division vs multiplication speed matters) |
On further inspection, there are |
I've taken a look at this and the codebase has both angle*RAD and angle/RAD as @no-lex said Is the division vs multiplication thing really that impactful? If so, whould we make an INV_RAD = 180/π constant and change the codebase accordingly? If not, the value of RAD should be π/180 imho |
@no-lex Actually why isn't this issue closed? lol |
The radian is a ratio equal to 180/π degrees or 1/(2π) revolutions. Because (of course)
tools.h
has to do everything its way, the macroRAD
is defined as π/180 which is, of course, totally wrong.The reason that RAD is inverted is for performance (division is slow and multiplication is fast), but this does not excuse the poor naming of the macro.
The text was updated successfully, but these errors were encountered: