← Back to context

Comment by newsoftheday

4 days ago

> I think this is missing the reason why these APIs are designed like this: because they're convenient and intuitive

Agreed. In my view, the method the author figured out is far from intuitive for the general population, including me.

I guess the point is: How often do we really need actual angles in the code? Probably only at the very ends: input from users and output to users. Everywhere else, we should just be treating them as sin/cos pairs or dot/cross pairs. So when the user inputs an angle, immediately convert it to what the computer actually needs, store it that way throughout the computation, and then only if/when the user needs to see an actual angle would you need to convert it back.