StrictMath.toDegrees() in Java

StrictMath.toDegrees(): This method is available in java.lang.StrictMath class of Java.

Syntax:

double java.lang.StrictMath.toDegrees(double angrad)

This method takes one argument of type double as its parameter. This method converts an angle measured in radians to an approximately equivalent angle measured in degrees.

Parameters: One parameter is required for this method.

angrad: an angle, in radians.

Returns: the measurement of the angle angrad in degrees.

Exceptions: NA

Approach

Java

public class StrictMathtoDegrees {
    public static void main(String[] args) {

        double angrad = 167;
        System.out.println(StrictMath.toDegrees(angrad));
    }
}

Output:

9568.395178684748


No comments:

Post a Comment