Sign Error

This commit is contained in:
Sandeep Nambiar 2014-08-13 05:49:39 +05:30
parent daade10ecc
commit b25e2bd782

View file

@ -823,7 +823,7 @@ Phaser.Point.rotate = function (a, x, y, angle, asDegrees, distance) {
distance = Math.sqrt(((x - a.x) * (x - a.x)) + ((y - a.y) * (y - a.y)));
}
var requiredAngle = angle - Math.atan2(a.y - y, a.x - x);
var requiredAngle = angle + Math.atan2(a.y - y, a.x - x);
return a.setTo(x + distance * Math.cos(requiredAngle), y + distance * Math.sin(requiredAngle));