mirror of
https://github.com/photonstorm/phaser
synced 2024-12-27 21:43:41 +00:00
12 lines
239 B
JavaScript
12 lines
239 B
JavaScript
|
var RotateAroundXY = require('./RotateAroundXY');
|
||
|
|
||
|
var Rotate = function (line, angle)
|
||
|
{
|
||
|
var x = (line.x1 + line.x2) / 2;
|
||
|
var y = (line.y1 + line.y2) / 2;
|
||
|
|
||
|
return RotateAroundXY(line, x, y, angle);
|
||
|
};
|
||
|
|
||
|
module.exports = Rotate;
|