Simulator/src/simulation/simulation/util/Utilities.java
/**
	 * Transforms a {@link Position} based on an origin and a rotation.
	 * 
	 * @param position
	 *            The position.
	 * @param origin
	 *            The point it is rotated around.
	 * @param degreeRotation
	 *            The degrees it is rotated.
	 * @return The transformed position.
	 */
Transforms a  Position based on an origin and a rotation.

@param position
The position.
@param origin
The point it is rotated around.
@param degreeRotation
The degrees it is rotated.
@return The transformed position.
Transforms a Position based on an origin and a rotation . @param position The position . @param origin The point it is rotated around . @param degreeRotation The degrees it is rotated . @return The transformed position .
public static Position transform(Position position, Position origin, double degreeRotation) {
		double x = position.x - origin.x;
		double y = position.y - origin.y;
		double theta = Math.toRadians(-degreeRotation);
		double cos = Math.cos(theta);
		double sin = Math.sin(theta);
		double rotX = x * cos - y * sin;
		double rotY = x * sin + y * cos;
		return new Position(rotX + origin.x, rotY + origin.y);
	}
public static Position transform ( Position position , Position origin , double degreeRotation ) { double x = position . x - origin . x ; double y = position . y - origin . y ; double theta = Math . toRadians ( - degreeRotation ) ; double cos = Math . cos ( theta ) ; double sin = Math . sin ( theta ) ; double rotX = x * cos - y * sin ; double rotY = x * sin + y * cos ; return new Position ( rotX + origin . x , rotY + origin . y ) ; }
Transforms a {@link Position} based on an origin and a rotation.
Transforms a { @link Position } based on an origin and a rotation .
// offset // rotation // corrected for the origin