// Path: Force Engine/src/forceengine/objects/Circle.java
// public interface Circle extends Rect {
// 	/**
// 	 * (double) getRadius
// 	 * 
// 	 * @return the radius
// 	 */
// 	public double getRadius();
// 
// 	/**
// 	 * (double) getRadius
// 	 * 
// 	 * @return the radius squared (radius^2)
// 	 */
// 	public double getRadiusSq();
// 
// 
// 	/**
// 	 * Sets the radius of the circle.
// 	 * 
// 	 * @param radius
// 	 *            The new radius of this circle.
// 	 */
// 	public void setRadius(double radius);
// 
// }
// 
// Path: Force Engine/src/forceengine/objects/StaticCircle.java
// public class StaticCircle extends Point implements Circle {
// 	protected double radius;
// 	protected double radiussq;
// 
// 	public StaticCircle(double x, double y, double radius){
// 		super(x, y);
// 		this.radius = radius;
// 		this.radiussq = radius * radius;
// 	}
// 	public StaticCircle(Point p, double radius){
// 		super(p);
// 		setRadius(radius);
// 	}
// 	@Override
// 	public boolean equals(Object obj){
// 		if(this == obj)
// 			return true;
// 		if(!super.equals(obj))
// 			return false;
// 		if(getClass() != obj.getClass())
// 			return false;
// 		StaticCircle other = (StaticCircle)obj;
// 		if(java.lang.Double.doubleToLongBits(radius) != java.lang.Double.doubleToLongBits(other.radius))
// 			return false;
// 		return true;
// 	}
// 	@Override
// 	public Rect getBounds() {
// 		return StaticRect.fromUpperLeft((int)(x - radius), (int)(y - radius), (int)(2 * radius), (int)(2 * radius));
// 	}
// 
// 	@Override
// 	public double getMaxX() {
// 		return x + radius;
// 	}
// 	@Override
// 	public double getMaxY() {
// 		return y + radius;
// 	}
// 
// 	@Override
// 	public double getMinX() {
// 		return x - radius;
// 	}
// 	@Override
// 	public double getMinY() {
// 		return y - radius;
// 	}
// 	@Override
// 	public double getRadius(){
// 		return radius;
// 	}
// 	@Override
// 	public double getRadiusSq(){
// 		return radiussq;
// 	}
// 	@Override
// 	public int hashCode(){
// 		final int prime = 31;
// 		int result = super.hashCode();
// 		result = (int)(prime * result + java.lang.Double.doubleToLongBits(radius));
// 		return result;
// 	}
// 	@Override
// 	public void setRadius(double radius){
// 		radius = Math.abs(radius);
// 		this.radius = radius;
// 		this.radiussq = radius * radius;
// 	}
// 	@Override
// 	public String toString(){
// 		return "(" + this.x + ", " + this.y + "); r = " + this.radius;
// 	}
// 	@Override
// 	public double getHeight() {
// 		return 2 * radius;
// 	}
// 	@Override
// 	public double getWidth() {
// 		return 2 * radius;
// 	}
// 	@Override
// 	public void setHeight(double height) {
// 		setRadius(height / 2);
// 	}
// 	@Override
// 	public void setWidth(double width) {
// 		setRadius(width / 2);
// 	}
// }


import java.util.ArrayList;
import forceengine.objects.Circle;
import forceengine.objects.StaticCircle;
package forceengine.math;



public class CircleMath {
	/**
	 * checks whether or not 2 circles have collided with each other
	 * 
	 * @param circle1
	 *            the first circle
	 * @param circle2
	 *            the second circle
	 * @return whether or not they have collided
	 */
	public static final boolean checkcirclecollide(Circle circle1,
			Circle circle2) {
		return checkcirclecollide(circle1.getX(), circle1.getY(),
				circle1.getRadius(), circle2.getX(), circle2.getY(),
				circle2.getRadius());
	}

	/**
	 * checks whether or not 2 circles have collided
	 * 
	 * @param x1
	 *            the x value of the first circle
	 * @param y1
	 *            the y value of the first circle
	 * @param radius1
	 *            the radius of the first circle
	 * @param x2
	 *            the x value of the second circle
	 * @param y2
	 *            the y value of the second circle
	 * @param radius2
	 *            the radius of the second circle
	 * @return whether or not they have collided
	 */
	public static final boolean checkcirclecollide(double x1, double y1,
			double radius1, double x2, double y2, double radius2) {
		return Math.abs((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)) < (radius1 + radius2)
				* (radius1 + radius2);
	}

	/**
	 * Checks whether or not an array of Circles has collided with a circle.
	 * 
	 * @param circles
	 *            The <code>ArrayList</code> of <code>Circle</code>.
	 * @param circle
	 *            The <code>Circle</code> that collision is to be done with.
	 * @return The index of the <code>Circle</code> in circles that collided
	 *         with circle.
	 */
	public static final ArrayList<Integer> checkcirclescollide(
// Path: Force Engine/src/forceengine/objects/Circle.java
// public interface Circle extends Rect {
// 	/**
// 	 * (double) getRadius
// 	 * 
// 	 * @return the radius
// 	 */
// 	public double getRadius();
// 
// 	/**
// 	 * (double) getRadius
// 	 * 
// 	 * @return the radius squared (radius^2)
// 	 */
// 	public double getRadiusSq();
// 
// 
// 	/**
// 	 * Sets the radius of the circle.
// 	 * 
// 	 * @param radius
// 	 *            The new radius of this circle.
// 	 */
// 	public void setRadius(double radius);
// 
// }
// 
// Path: Force Engine/src/forceengine/objects/StaticCircle.java
// public class StaticCircle extends Point implements Circle {
// 	protected double radius;
// 	protected double radiussq;
// 
// 	public StaticCircle(double x, double y, double radius){
// 		super(x, y);
// 		this.radius = radius;
// 		this.radiussq = radius * radius;
// 	}
// 	public StaticCircle(Point p, double radius){
// 		super(p);
// 		setRadius(radius);
// 	}
// 	@Override
// 	public boolean equals(Object obj){
// 		if(this == obj)
// 			return true;
// 		if(!super.equals(obj))
// 			return false;
// 		if(getClass() != obj.getClass())
// 			return false;
// 		StaticCircle other = (StaticCircle)obj;
// 		if(java.lang.Double.doubleToLongBits(radius) != java.lang.Double.doubleToLongBits(other.radius))
// 			return false;
// 		return true;
// 	}
// 	@Override
// 	public Rect getBounds() {
// 		return StaticRect.fromUpperLeft((int)(x - radius), (int)(y - radius), (int)(2 * radius), (int)(2 * radius));
// 	}
// 
// 	@Override
// 	public double getMaxX() {
// 		return x + radius;
// 	}
// 	@Override
// 	public double getMaxY() {
// 		return y + radius;
// 	}
// 
// 	@Override
// 	public double getMinX() {
// 		return x - radius;
// 	}
// 	@Override
// 	public double getMinY() {
// 		return y - radius;
// 	}
// 	@Override
// 	public double getRadius(){
// 		return radius;
// 	}
// 	@Override
// 	public double getRadiusSq(){
// 		return radiussq;
// 	}
// 	@Override
// 	public int hashCode(){
// 		final int prime = 31;
// 		int result = super.hashCode();
// 		result = (int)(prime * result + java.lang.Double.doubleToLongBits(radius));
// 		return result;
// 	}
// 	@Override
// 	public void setRadius(double radius){
// 		radius = Math.abs(radius);
// 		this.radius = radius;
// 		this.radiussq = radius * radius;
// 	}
// 	@Override
// 	public String toString(){
// 		return "(" + this.x + ", " + this.y + "); r = " + this.radius;
// 	}
// 	@Override
// 	public double getHeight() {
// 		return 2 * radius;
// 	}
// 	@Override
// 	public double getWidth() {
// 		return 2 * radius;
// 	}
// 	@Override
// 	public void setHeight(double height) {
// 		setRadius(height / 2);
// 	}
// 	@Override
// 	public void setWidth(double width) {
// 		setRadius(width / 2);
// 	}
// }


// Path: Force Engine/src/forceengine/math/CircleMath.java
import java.util.ArrayList;
import forceengine.objects.Circle;
import forceengine.objects.StaticCircle;

package forceengine.math;



public class CircleMath {
	/**
	 * checks whether or not 2 circles have collided with each other
	 * 
	 * @param circle1
	 *            the first circle
	 * @param circle2
	 *            the second circle
	 * @return whether or not they have collided
	 */
	public static final boolean checkcirclecollide(Circle circle1,
			Circle circle2) {
		return checkcirclecollide(circle1.getX(), circle1.getY(),
				circle1.getRadius(), circle2.getX(), circle2.getY(),
				circle2.getRadius());
	}

	/**
	 * checks whether or not 2 circles have collided
	 * 
	 * @param x1
	 *            the x value of the first circle
	 * @param y1
	 *            the y value of the first circle
	 * @param radius1
	 *            the radius of the first circle
	 * @param x2
	 *            the x value of the second circle
	 * @param y2
	 *            the y value of the second circle
	 * @param radius2
	 *            the radius of the second circle
	 * @return whether or not they have collided
	 */
	public static final boolean checkcirclecollide(double x1, double y1,
			double radius1, double x2, double y2, double radius2) {
		return Math.abs((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)) < (radius1 + radius2)
				* (radius1 + radius2);
	}

	/**
	 * Checks whether or not an array of Circles has collided with a circle.
	 * 
	 * @param circles
	 *            The <code>ArrayList</code> of <code>Circle</code>.
	 * @param circle
	 *            The <code>Circle</code> that collision is to be done with.
	 * @return The index of the <code>Circle</code> in circles that collided
	 *         with circle.
	 */
	public static final ArrayList<Integer> checkcirclescollide(
			ArrayList<Circle> circles, Circle circle) {