Hacker News new | ask | show | jobs
by 7steps2much 1365 days ago
True, but if you are talking about video games in particular you could just build a sin/cos function with different parameters into the game engine.

have a `sin(x)` where the unit of x is radiants and a `sin_turn(x)` where x is expressed in turns.

Video games especially are a great situation to do it like this because they often use a framework (game engine) that was specifically created for this purpose.

1 comments

Yes, this is the topic of the fine article and the point that is being made. Ideally both of the multiplies (one in the user code to multiply by pi and another in the engine code to divide by pi) can be omitted.