Package uk.ac.starlink.ttools.func
Class TrigDegrees
java.lang.Object
uk.ac.starlink.ttools.func.TrigDegrees
Standard trigonometric functions with angles in degrees.
- Since:
- 2 Sep 2004
- Author:
- Mark Taylor (Starlink)
-
Method Summary
Modifier and TypeMethodDescriptionstatic double
acosDeg
(double x) Arc cosine.static double
asinDeg
(double x) Arc sine.static double
atan2Deg
(double y, double x) Converts rectangular coordinates (x
,y
) to polar (r
,theta
).static double
atanDeg
(double x) Arc tangent.static double
cosDeg
(double theta) Cosine of an angle.static double
sinDeg
(double theta) Sine of an angle.static double
tanDeg
(double theta) Tangent of an angle.
-
Method Details
-
sinDeg
public static double sinDeg(double theta) Sine of an angle.- Parameters:
theta
- an angle, in degrees- Returns:
- the sine of the argument
-
cosDeg
public static double cosDeg(double theta) Cosine of an angle.- Parameters:
theta
- an angle, in degrees- Returns:
- the cosine of the argument
-
tanDeg
public static double tanDeg(double theta) Tangent of an angle.- Parameters:
theta
- an angle, in degrees- Returns:
- the tangent of the argument.
-
asinDeg
public static double asinDeg(double x) Arc sine. The result is in the range of -90 through 90.- Parameters:
x
- the value whose arc sine is to be returned.- Returns:
- the arc sine of the argument in degrees
-
acosDeg
public static double acosDeg(double x) Arc cosine. The result is in the range of 0.0 through 180.- Parameters:
x
- the value whose arc cosine is to be returned.- Returns:
- the arc cosine of the argument in degrees
-
atanDeg
public static double atanDeg(double x) Arc tangent. The result is in the range of -90 through 90.- Parameters:
x
- the value whose arc tangent is to be returned.- Returns:
- the arc tangent of the argument in degrees
-
atan2Deg
public static double atan2Deg(double y, double x) Converts rectangular coordinates (x
,y
) to polar (r
,theta
). This method computes the phasetheta
by computing an arc tangent ofy/x
in the range of -180 to 180.- Parameters:
y
- the ordinate coordinatex
- the abscissa coordinate- Returns:
- the
theta
component in degrees of the point (r
,theta
) in polar coordinates that corresponds to the point (x
,y
) in Cartesian coordinates.
-