private double DegreeToRadian(double angle)
{
return Math.PI * angle / 180.0;
}

//Get the Cosine of a 45 degree angle
double angle = Math.Cos(DegreeToRadian(45));
4
Contributors
5
Replies
16
Views
9 Years
Discussion Span
Last Post by ddanbe
0

If the angle isn't whole use a decimal point (45.352343). If you want to convert something like 45°30'10'' to a decimal representation then that would be a different function to write.

0

it will gives error...tan(90) will comes with values but google calc gives error...help me

Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.