tig.maths
Class Maths
- java.lang.Object
-
- tig.maths.Maths
-
public abstract class Maths extends java.lang.ObjectAbstract class containing mathematical constants and static methods.
-
-
Field Summary
Fields Modifier and Type Field and Description static doubleARCSEC_TO_RADConstant to convert arc seconds to radians, whose value is p / (180 * 3600).static doubleln10Constant whose value is ln(10).static doubleRAD_TO_ARCSECConstant to convert radians to arc seconds, whose value is 180 * 3600 / p.static doubleTWOPIConstant whose value is 2 x p.
-
Constructor Summary
Constructors Constructor and Description Maths()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static doubleatan3(double y, double x)Computation of arcTangent, giving a result in [0, 2*p[.static doublelog10(double x)Computes the 10 based logarithm of a number.static doublemax(double[] a)Returns the greatest double of an array.static intmax(int[] a)Returns the greatest integer of an array.static doublemin(double[] a)Returns the smallest double of an array.static doublemod360(double nb)Reduction of a number in the interval [0, 360].static intmod360(int nb)Reduction of a number in the interval [0, 360], for an integer.static doublemodX(double nb, double limit)Reduction of a number in the interval [0, limit].
-
-
-
Field Detail
-
TWOPI
public static final double TWOPI
Constant whose value is 2 x p.- See Also:
- Constant Field Values
-
ln10
public static final double ln10
Constant whose value is ln(10).- See Also:
- Constant Field Values
-
ARCSEC_TO_RAD
public static final double ARCSEC_TO_RAD
Constant to convert arc seconds to radians, whose value is p / (180 * 3600).- See Also:
- Constant Field Values
-
RAD_TO_ARCSEC
public static final double RAD_TO_ARCSEC
Constant to convert radians to arc seconds, whose value is 180 * 3600 / p.- See Also:
- Constant Field Values
-
-
Method Detail
-
mod360
public static double mod360(double nb)
Reduction of a number in the interval [0, 360].- Parameters:
nb- any number.- Returns:
nbmodulo360.
-
mod360
public static int mod360(int nb)
Reduction of a number in the interval [0, 360], for an integer.- Parameters:
nb- any number.- Returns:
nbmodulo360.
-
modX
public static double modX(double nb, double limit)Reduction of a number in the interval [0, limit].- Parameters:
nb- any number.limit- any positive number.- Returns:
nbmodulolimit.
-
atan3
public static double atan3(double y, double x)Computation of arcTangent, giving a result in [0, 2*p[.- Returns:
- A number
alphasuch ascos(alpha) = x/sqrt(x*x + y*y)andsin(alpha) = y/sqrt(x*x + y*y)and alpha belongs to [0, 2*p[.
-
log10
public static double log10(double x)
Computes the 10 based logarithm of a number.- Returns:
- 10 based Logarithm of
x.
-
max
public static int max(int[] a)
Returns the greatest integer of an array.
-
max
public static double max(double[] a)
Returns the greatest double of an array.
-
min
public static double min(double[] a)
Returns the smallest double of an array.
-
-
DMelt 3.0 © DataMelt by jWork.ORG