radians()

本参考资料用于Processing 3.0+。 如果你使用的是前一版本,请在使用软件帮助菜单内的参考资料。. If you see any errors or have suggestions, please let us know. If you prefer a more technical reference, visit the Processing Core Javadoc and Libraries Javadoc.

名称

radians()

示例
float deg = 45.0;


float rad = radians(deg);

println(deg + " degrees is " + rad + " radians");

描述 Converts a degree measurement to its corresponding value in radians. Radians and degrees are two ways of measuring the same thing. There are 360 degrees in a circle and 2*PI radians in a circle. For example, 90°

= PI/2 = 1.5707964. All trigonometric functions in Processing require their parameters to be specified in radians.

语法
radians(degrees)
参数
degrees float: degree value to convert to radians
返回值 float
相关 degrees()

Updated on October 2, 2018 05:02:06pm EDT

radians()