The deg2rad()
is an inbuilt function in julia which is used to convert the specified degree values to radian values.
Syntax: deg2rad(x)
Parameters:
- x: Specified value in degree.
Returns: It returns the values in radian.
Example:
# 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 ))
|
Output:
0.0 0.5235987755982988 0.8726646259971648 1.0471975511965976
rad2deg()
The rad2deg()
is an inbuilt function in julia which is used to convert the specified radian values to degree values.
Syntax: rad2deg(x)
Parameters:
- x: Specified values in radian.
Returns: It returns the values in degree.
Example:
# 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 ))
|
Output:
180.0 179.9087476710785 180.07244989825872
Article Tags :
Recommended Articles