Is there any valid reason radians are used as the inputs to trig function in many modern languages?
Posted
by
johnmortal
on Stack Overflow
See other posts from Stack Overflow
or by johnmortal
Published on 2011-02-28T20:31:16Z
Indexed on
2011/03/02
23:24 UTC
Read the original article
Hit count: 276
Is there any pressing reason trig functions should use radian inputs in modern programming languages?
As far as I know radians are typically ugly to deal with except in three cases: (1) You want to compute an arc length and you know the angle of the arc and (2) You need to do symbolic calculus with trig functions (3) certain infinite series expansion look prettier if the input is in radians. None of these scenarios seem like a worthy justification for every programming language I am familiar with using radian inputs for Sin, Cos, Tangent, etc... The third one sounds good because it might mean one gets faster computations using radians (very slightly faster- the cost of one additional floating point multiplication ) , but I am dubious even of that because most commonly the developer had to take an extra step to put the angle in radians in the first place. The other two are ridiculous justifications for all the added obscurity.
© Stack Overflow or respective owner