given the following code:
double sin = Math.Sin(59.0);
double sin2 = Math.Sin(31.0);
first result is 0.64.. second result is -0.4..
if I type the same numbers into my calculator:
sin(59) = 0.86..
sin(31) = 0.51..
what do I do wrong?
given the following code:
double sin = Math.Sin(59.0);
double sin2 = Math.Sin(31.0);
first result is 0.64.. second result is -0.4..
if I type the same numbers into my calculator:
sin(59) = 0.86..
sin(31) = 0.51..
what do I do wrong?
Copyright © 2021 Jogjafile Inc.
The same as most programming languages, in S,
Sin
function gets input in Radian. So if you desire to get the sin of59
degree, you should writeMath.Sin(59.0 * 3.1416/180.0)
(By3.1416
, I mean PI value).