Class Circle2D

java.lang.Object
org.htmlunit.util.geometry.Circle2D
All Implemented Interfaces:
Shape2D

public class Circle2D extends Object implements Shape2D
Simple 2D shape circle.
  • Field Details

    • centerX_

      private final double centerX_
    • centerY_

      private final double centerY_
    • radius_

      private final double radius_
  • Constructor Details

    • Circle2D

      public Circle2D(double centerX, double centerY, double radius)
      Ctor.
      Parameters:
      centerX - x value of the second center
      centerY - y value of the second center
      radius - the radius
  • Method Details

    • contains

      public boolean contains(double x, double y)
      Specified by:
      contains in interface Shape2D
      Parameters:
      x - point x value
      y - point y value
      Returns:
      true if the specified point is inside; false otherwise.
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface Shape2D
      Returns:
      true if the Shape is empty.
    • toString

      public String toString()
      Overrides:
      toString in class Object