public final class Circle
extends java.lang.Object
Constructor and Description |
---|
Circle(double cx,
double cy,
double r)
Creates a new circle with the specified size and location.
|
Circle(java.awt.geom.Point2D center,
double r)
Creates a new circle with the specified size and location.
|
Circle(Vect center,
double r)
Creates a new circle with the specified size and location.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Circle c) |
boolean |
equals(java.lang.Object o) |
Vect |
getCenter() |
double |
getRadius() |
int |
hashCode() |
java.awt.geom.Ellipse2D |
toEllipse2D() |
java.lang.String |
toString() |
public Circle(Vect center, double r)
center
- the center point of the circle; requires that center
!= nullr
- the radius of the circle; requires that r
>= 0public Circle(double cx, double cy, double r)
cx
- the x coordinate of the center point of the circlecy
- the y coordinate of the center point of the circler
- the radius of the circle; requires that r
>= 0public Circle(java.awt.geom.Point2D center, double r)
center
- the center point of the circle; requires that center
!= nullr
- the radius of the circle; requires that r
>= 0public Vect getCenter()
public double getRadius()
public java.awt.geom.Ellipse2D toEllipse2D()
public boolean equals(Circle c)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object