deg2rad()
是 julia 中的一个内置函数,用于将指定的度数值转换为弧度值。
Syntax: deg2rad(x)
Parameters:
- x: Specified value in degree.
Returns: It returns the values in radian.
例子:
# Julia program to illustrate
# the use of deg2rad() method
# Getting the values in radian
println(deg2rad(0))
println(deg2rad(30))
println(deg2rad(50))
println(deg2rad(60))
输出:
0.0
0.5235987755982988
0.8726646259971648
1.0471975511965976
rad2deg()
rad2deg()
是 julia 中的一个内置函数,用于将指定的弧度值转换为度数值。
Syntax: rad2deg(x)
Parameters:
- x: Specified values in radian.
Returns: It returns the values in degree.
例子:
# Julia program to illustrate
# the use of rad2deg() method
# Getting the values in degree
println(rad2deg(pi))
println(rad2deg(3.14))
println(rad2deg(22 / 7))
输出:
180.0
179.9087476710785
180.07244989825872