Small tidying.

This commit is contained in:
Michael Bayne
2011-09-09 10:07:34 -07:00
parent c82f38fa97
commit 2753a9523d
2 changed files with 6 additions and 6 deletions
@@ -20,12 +20,14 @@ public abstract class AbstractCircle implements ICircle
@Override // from ICircle
public boolean contains (IPoint p) {
return Points.distanceSq(x(), y(), p.x(), p.y()) < radius() * radius();
float r = radius();
return Points.distanceSq(x(), y(), p.x(), p.y()) < r * r;
}
@Override // from ICircle
public boolean contains (float x, float y) {
return Points.distanceSq(x(), y(), x, y) < radius() * radius();
float r = radius();
return Points.distanceSq(x(), y(), x, y) < r * r;
}
@Override // from ICircle
+2 -4
View File
@@ -28,13 +28,11 @@ public interface ICircle
boolean contains (float x, float y);
/** Translates the circle by the specified offset.
* @return a new Circle containing the result.
*/
* @return a new Circle containing the result. */
Circle offset (float x, float y);
/** Translates the circle by the specified offset and stores the result in the supplied object.
* @return a reference to the result, for chaining.
*/
* @return a reference to the result, for chaining. */
Circle offset (float x, float y, Circle result);
/** Returns a mutable copy of this circle. */