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