Class Latitude

java.lang.Object
java.lang.Number
io.jenetics.jpx.Latitude
All Implemented Interfaces:
Serializable

public final class Latitude extends Number implements Serializable
The latitude of the point. Decimal degrees, WGS84 datum, which must be within the range of [-90..90].
Since:
1.0
Version:
2.0
See Also:
  • Field Details

    • MIN_DEGREES

      public static final double MIN_DEGREES
      A constant holding the maximum value a Latitude value can have, -90 inclusively.
      Since:
      2.0
      See Also:
    • MIN_VALUE

      public static final Latitude MIN_VALUE
      A constant holding the maximum value a Latitude value can have, -90 inclusively.
      Since:
      1.4
    • MAX_DEGREES

      public static final double MAX_DEGREES
      A constant holding the maximum value a Latitude value can have, 90 inclusively.
      Since:
      2.0
      See Also:
    • MAX_VALUE

      public static final Latitude MAX_VALUE
      A constant holding the maximum value a Latitude value can have, 90 inclusively.
      Since:
      1.4
  • Method Details

    • doubleValue

      public double doubleValue()
      Return the latitude value in decimal degrees.
      Specified by:
      doubleValue in class Number
      Returns:
      the latitude value in decimal degrees
    • toRadians

      public double toRadians()
      Return the latitude value in radians.
      Returns:
      the latitude value in radians
    • toDegrees

      public double toDegrees()
      Return the latitude in decimal degree.
      Returns:
      the latitude in decimal degree
    • intValue

      public int intValue()
      Specified by:
      intValue in class Number
    • longValue

      public long longValue()
      Specified by:
      longValue in class Number
    • floatValue

      public float floatValue()
      Specified by:
      floatValue in class Number
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • ofDegrees

      public static Latitude ofDegrees(double degrees)
      Create a new (decimal degrees) Latitude object.
      Parameters:
      degrees - the latitude value in decimal degrees
      Returns:
      a new (decimal degrees) Latitude object
      Throws:
      IllegalArgumentException - if the given value is not within the range of [-90..90]
    • ofRadians

      public static Latitude ofRadians(double radians)
      Create a new Latitude value for the given radians.
      Parameters:
      radians - the latitude value in radians
      Returns:
      a new Latitude value for the given radians
      Throws:
      IllegalArgumentException - if the given radians is not within the range of [-Pi..Pi]