Here you can find the source of project(Point2D.Double sourceLocation, double angle, double length)
public static Point2D.Double project(Point2D.Double sourceLocation, double angle, double length)
//package com.java2s; import java.awt.geom.Point2D; public class Main { public static Point2D.Double project(Point2D.Double sourceLocation, double angle, double length) { return project(sourceLocation, Math.sin(angle), Math.cos(angle), length);// ww w. j av a 2 s .c o m } public static Point2D.Double project(Point2D.Double sourceLocation, double sinAngle, double cosAngle, double length) { return new Point2D.Double(sourceLocation.x + sinAngle * length, sourceLocation.y + cosAngle * length); } }