The rad2deg()
method can convert the given radian value to a degree value.
rad2deg(radian)
This method takes the parameter radian
, representing the radian value for which the degree value is found.
This method returns the degree value of the given radian.
The code below demonstrates how to use the rad2deg
method.
## find degree of 0 radianradian = 0println( "Degree value of $(radian) radian is : $(rad2deg(radian))")## find degree of 0.17453292519943295 radianradian = 0.17453292519943295println( "Degree value of $(radian) radian is : $(rad2deg(radian))")
0
as its value.rad2deg
method with the variable radian
as an argument. This method converts the radians to degrees. The degree value of radian 0
is 0.0.0.17453292519943295
as the value for the variable radian
.rad2deg
method with the variable radian
as an argument. This method will convert the radian to a degree. The degree value of 0.17453292519943295
radians is 10.0.