Class XYRectangle


  • public final class XYRectangle
    extends XYGeometry
    Represents a x/y cartesian rectangle.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      float maxX
      minimum y value
      float maxY
      maximum y value
      float minX
      minimum x value
      float minY
      maximum x value
    • Constructor Summary

      Constructors 
      Constructor Description
      XYRectangle​(float minX, float maxX, float minY, float maxY)
      Constructs a bounding box by first validating the provided x and y coordinates
    • Field Detail

      • minX

        public final float minX
        minimum x value
      • maxX

        public final float maxX
        minimum y value
      • minY

        public final float minY
        maximum x value
      • maxY

        public final float maxY
        maximum y value
    • Constructor Detail

      • XYRectangle

        public XYRectangle​(float minX,
                           float maxX,
                           float minY,
                           float maxY)
        Constructs a bounding box by first validating the provided x and y coordinates
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • fromPointDistance

        public static XYRectangle fromPointDistance​(float x,
                                                    float y,
                                                    float radius)
        Compute Bounding Box for a circle in cartesian geometry
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object