public class Circle
extends java.lang.Object
implements java.lang.Cloneable
| Constructor and Description |
|---|
Circle()
Creates a new circle at location 0,0 and a radius of 0.
|
Circle(double cx,
double cy,
double r)
Creates a new circle with the specified coordinates and radius.
|
| Modifier and Type | Method and Description |
|---|---|
Circle |
clone() |
boolean |
contains(Circle that)
Returns true, if this circle contains that circle.
|
boolean |
contains(Circle that,
double error) |
boolean |
contains(double px,
double py)
Returns true, if this circle contains the specified point.
|
double |
getCX()
Returns the x-coordinate of the center of the circle.
|
double |
getCY()
Returns the y-coordinate of the center of the circle.
|
double |
getIntersectionRadius(Circle that)
Returns true, if this circle intersects that circle.
|
double |
getRadius()
Returns the radius of the circle.
|
boolean |
intersects(Circle that)
Returns true, if this circle intersects that circle.
|
boolean |
intersects(Circle that,
double error) |
java.lang.String |
toString() |
public Circle()
public Circle(double cx,
double cy,
double r)
public double getRadius()
public double getCX()
public double getCY()
public boolean intersects(Circle that)
public boolean intersects(Circle that, double error)
public double getIntersectionRadius(Circle that)
public boolean contains(Circle that)
public boolean contains(Circle that, double error)
public boolean contains(double px,
double py)
public java.lang.String toString()
toString in class java.lang.Objectpublic Circle clone()
clone in class java.lang.Object