Point.prototype.distanceAngle = function (dist, angle) {
var deg = angle, x, y;
if (deg > 270) {
deg = deg - 360;
} else if (deg < -270) {
deg = deg + 360;
}
if (-90 <= deg && deg <= 90) {
x = Math.sin(radians(deg)) * dist;
y = Math.sqrt((dist * dist) - (x * x));
return new Point(x + this.x, this.y - y);
}
x = Math.sin(radians(180 - deg)) * dist;
y = Math.sqrt((dist * dist) - (x * x));
return new Point(x + this.x, this.y + y);
};
I found it in morphic.js: morphic.js, lines 2545 to 2560