phaser/src/geom/triangle/Rotate.js
2018-01-09 21:43:56 +00:00

22 lines
497 B
JavaScript

var RotateAroundXY = require('./RotateAroundXY');
var InCenter = require('./InCenter');
/**
* [description]
*
* @function Phaser.Geom.Triangle.Rotate
* @since 3.0.0
*
* @param {Phaser.Geom.Triangle} triangle - [description]
* @param {number} angle - [description]
*
* @return {Phaser.Geom.Triangle} [description]
*/
var Rotate = function (triangle, angle)
{
var point = InCenter(triangle);
return RotateAroundXY(triangle, point.x, point.y, angle);
};
module.exports = Rotate;