UNPKG

arcade-physics

Version:
22 lines 762 B
"use strict"; /** * @author Richard Davey <rich@photonstorm.com> * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ Object.defineProperty(exports, "__esModule", { value: true }); /** * Calculates the square of magnitude of given point.(Can be used for fast magnitude calculation of point) * * @function Phaser.Geom.Point.GetMagnitudeSq * @since 3.0.0 * * @param {Phaser.Geom.Point} point - Returns square of the magnitude/length of given point. * * @return {number} Returns square of the magnitude of given point. */ const GetMagnitudeSq = point => { return point.x * point.x + point.y * point.y; }; exports.default = GetMagnitudeSq; //# sourceMappingURL=GetMagnitudeSq.js.map