Scala Float toRadians() method with example
Last Updated :
29 Oct, 2019
The toRadians() method is utilized to converts an angle measured in degrees to an approximately equivalent angle measured in radians.
Method Definition: (Number).toRadians
Return Type: It returns the converted value of radians.
Example #1:
object GfG
{
def main(args : Array[String])
{
val result = ( 56 ).toRadians
println(result)
}
}
|
Example #2:
object GfG
{
def main(args : Array[String])
{
val result = ( 180 ).toRadians
println(result)
}
}
|
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...