UNPKG

@phaserjs/phaser

Version:
12 lines (11 loc) 394 B
/** * @author Richard Davey <rich@photonstorm.com> * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ import { RotateLineAround } from "./RotateLineAround"; export function RotateLine(line, angle) { const x = (line.x1 + line.x2) / 2; const y = (line.y1 + line.y2) / 2; return RotateLineAround(line, x, y, angle); }