Math/src/main/java/com/techshroom/tscore/math/Maths.java
public static double projectLineAlongSurface(double thetaSurface,
			double thetaLineToProject, double magnitude, boolean getY) {
		double dp = dotProductAngles(magnitude, thetaLineToProject, 1,
				thetaSurface);
		if (!getY) {
			System.out.println(dp);
			return dp * Math.cos(Math.toRadians(thetaSurface));
		} else {
			System.out.println(dp);
			return dp * Math.sin(Math.toRadians(thetaSurface));
		}

	}
/**
	 * Finds the length of a line when projected along another line. Used for
	 * collisions.
	 * 
	 * @param thetaSurface
	 *            - The angle the surface to be projected upon makes with the
	 *            horizontal
	 * @param thetaLineToProject
	 *            - The angle the line makes with the horizontal
	 * @param magnitude
	 *            - The length of the line.
	 * @param getY
	 *            - Gets the length of the line when projected along the line
	 *            perpendicular to the thetaSurface given (eg, find the y).
	 * @return length of line when projected on another line
	 */
Finds the length of a line when projected along another line. Used for
collisions.

@param thetaSurface
- The angle the surface to be projected upon makes with the
horizontal
@param thetaLineToProject
- The angle the line makes with the horizontal
@param magnitude
- The length of the line.
@param getY
- Gets the length of the line when projected along the line
perpendicular to the thetaSurface given .
@return length of line when projected on another line
Finds the length of a line when projected along another line . Used for collisions . @param thetaSurface - The angle the surface to be projected upon makes with the horizontal @param thetaLineToProject - The angle the line makes with the horizontal @param magnitude - The length of the line . @param getY - Gets the length of the line when projected along the line perpendicular to the thetaSurface given . @return length of line when projected on another line
public static double projectLineAlongSurface(double thetaSurface,
			double thetaLineToProject, double magnitude, boolean getY) {
		double dp = dotProductAngles(magnitude, thetaLineToProject, 1,
				thetaSurface);
		if (!getY) {
			System.out.println(dp);
			return dp * Math.cos(Math.toRadians(thetaSurface));
		} else {
			System.out.println(dp);
			return dp * Math.sin(Math.toRadians(thetaSurface));
		}
	}
public static double projectLineAlongSurface ( double thetaSurface , double thetaLineToProject , double magnitude , boolean getY ) { double dp = dotProductAngles ( magnitude , thetaLineToProject , 1 , thetaSurface ) ; if ( ! getY ) { System . out . println ( dp ) ; return dp * Math . cos ( Math . toRadians ( thetaSurface ) ) ; } else { System . out . println ( dp ) ; return dp * Math . sin ( Math . toRadians ( thetaSurface ) ) ; } }
Finds the length of a line when projected along another line.
Finds the length of a line when projected along another line .