Class BigPoint

java.lang.Object
com.google.common.geometry.BigPoint
All Implemented Interfaces:
Comparable<BigPoint>

@GwtCompatible final class BigPoint extends Object implements Comparable<BigPoint>
A point consisting of BigDecimal coordinates.
  • Field Details

  • Constructor Details

    • BigPoint

      BigPoint(S2Point p)
      Creates a point of BigDecimal coordinates from a point of double coordinates.
    • BigPoint

      BigPoint(BigDecimal x, BigDecimal y, BigDecimal z)
      Creates a point from the given BigDecimal coordinates.
  • Method Details

    • toS2Point

      S2Point toS2Point()
      Returns an S2Point by rounding 'this' to double precision.
    • crossProd

      BigPoint crossProd(BigPoint that)
      Returns the vector cross product of 'this' with 'that'.
    • dotProd

      BigDecimal dotProd(BigPoint that)
      Returns the vector dot product of 'this' with 'that'.
    • dotProd

      BigDecimal dotProd(S2Point that)
      Returns the vector dot product of 'this' with 'that'.
    • isLinearlyDependent

      boolean isLinearlyDependent(BigPoint p)
      Returns true iff this and 'p' are exactly parallel or anti-parallel.
    • isAntipodal

      boolean isAntipodal(BigPoint p)
      Returns true iff this and 'p' are exactly anti-parallel, antipodal points.
    • norm2

      BigDecimal norm2()
      Returns the square of the magnitude of this vector.
    • compareTo

      public int compareTo(BigPoint p)
      Specified by:
      compareTo in interface Comparable<BigPoint>
    • equals

      public boolean equals(Object that)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object