JEphem site
jephem API
Build classes

tig.maths
Class Maths

java.lang.Object
  |
  +--tig.maths.Maths

public abstract class Maths
extends java.lang.Object

Abstract class containing mathematical constants and static methods.


Field Summary
static double ARCSEC_TO_RAD
          Constant to convert arc seconds to radians, whose value is p / (180 * 3600).
static double ln10
          Constant whose value is ln(10).
static double RAD_TO_ARCSEC
          Constant to convert radians to arc seconds, whose value is 180 * 3600 / p.
static double TWOPI
          Constant whose value is 2 x p.
 
Constructor Summary
Maths()
           
 
Method Summary
static double atan3(double y, double x)
          Computation of arcTangent, giving a result in [0, 2*p[.
static double log10(double x)
          Computes the 10 based logarithm of a number.
static double max(double[] a)
          Returns the greatest double of an array.
static int max(int[] a)
          Returns the greatest integer of an array.
static double min(double[] a)
          Returns the smallest double of an array.
static double mod360(double nb)
          Reduction of a number in the interval [0, 360].
static int mod360(int nb)
          Reduction of a number in the interval [0, 360], for an integer.
static double modX(double nb, double limit)
          Reduction of a number in the interval [0, limit].
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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
Constructor Detail

Maths

public Maths()
Method Detail

mod360

public static double mod360(double nb)
Reduction of a number in the interval [0, 360].

Parameters:
nb - any number.
Returns:
nb modulo 360.

mod360

public static int mod360(int nb)
Reduction of a number in the interval [0, 360], for an integer.

Parameters:
nb - any number.
Returns:
nb modulo 360.

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:
nb modulo limit.

atan3

public static double atan3(double y,
                           double x)
Computation of arcTangent, giving a result in [0, 2*p[.

Returns:
A number alpha such as cos(alpha) = x/sqrt(x*x + y*y) and sin(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.


JEphem site
jephem API
Build classes