Skip to content

Commit b25e2bd

Browse files
committed
Sign Error
1 parent daade10 commit b25e2bd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/geom/Point.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,7 @@ Phaser.Point.rotate = function (a, x, y, angle, asDegrees, distance) {
823823
distance = Math.sqrt(((x - a.x) * (x - a.x)) + ((y - a.y) * (y - a.y)));
824824
}
825825

826-
var requiredAngle = angle - Math.atan2(a.y - y, a.x - x);
826+
var requiredAngle = angle + Math.atan2(a.y - y, a.x - x);
827827

828828
return a.setTo(x + distance * Math.cos(requiredAngle), y + distance * Math.sin(requiredAngle));
829829

0 commit comments

Comments
 (0)