We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 773e043 + 1ab154b commit 6febf71Copy full SHA for 6febf71
src/math/Vector2.js
@@ -415,6 +415,17 @@ THREE.Vector2.prototype = {
415
416
return this;
417
418
+ },
419
+
420
+ rotateAround: function ( center, rotation ) {
421
422
+ var x = this.x - center.x, y = this.y - center.y;
423
424
+ this.x = center.x + x * Math.cos(rotation) - y * Math.sin(rotation);
425
+ this.y = center.y + y * Math.cos(rotation) + x * Math.sin(rotation);
426
427
+ return this;
428
429
}
430
431
};
0 commit comments