A method called sine, which takes as its only parameter a value of type double, and returns a value
of type double. The parameter represents an angle expressed in radians, and the value returned by
the method represents the trigonometric sine of this angle. For example, suppose the following method
call is executed:double sin = MathAssignment.sine(1.047197551);
.
public class MathAssignment {
public static double sine(double rad) {
return Math.sin(rad);
}
}
Comments
Leave a comment