radtodeg


描述

Once you have done your calculations using sin, or cos etc... the result is in radians. This may not always be what you want and so to turn the radians into degrees we use this function. For example, radtodeg(sin(180)) will return -45 degrees. This function translates radians into degrees using the formula:

angle_degrees = angle_radians * 180 / pi;


语法:

radtodeg(rad);


参数 描述
rad The radians to convert.


Returns:

实数


例如:

val = radtodeg( pi );

This will set val to 180.