arcade-physics
Version:
Use Arcade Physics without Phaser.
30 lines • 1.12 kB
JavaScript
;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2020 Photon Storm Ltd.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const RotateAroundXY_1 = __importDefault(require("./RotateAroundXY"));
/**
* Rotate a line around a point by the given angle in radians.
*
* @function Phaser.Geom.Line.RotateAroundPoint
* @since 3.0.0
*
* @generic {Phaser.Geom.Line} O - [line,$return]
*
* @param {Phaser.Geom.Line} line - The line to rotate.
* @param {(Phaser.Geom.Point|object)} point - The point to rotate the line around.
* @param {number} angle - The angle of rotation in radians.
*
* @return {Phaser.Geom.Line} The rotated line.
*/
const RotateAroundPoint = (line, point, angle) => {
return (0, RotateAroundXY_1.default)(line, point.x, point.y, angle);
};
exports.default = RotateAroundPoint;
//# sourceMappingURL=RotateAroundPoint.js.map