mirror of
https://github.com/photonstorm/phaser
synced 2025-01-15 22:54:03 +00:00
11 lines
239 B
JavaScript
11 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;
|