UNPKG

phaser

Version:

A fast, free and fun HTML5 Game Framework for Desktop and Mobile web browsers from the team at Phaser Studio Inc.

26 lines (22 loc) 679 B
/** * @author samme * @copyright 2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var NormalizeAngle = require('./Normalize'); /** * Gets the clockwise (nonnegative) angular distance from angle1 to angle2. * * @function Phaser.Math.Angle.GetClockwiseDistance * @since 4.0.0 * * @param {number} angle1 - The starting angle in radians. * @param {number} angle2 - The target angle in radians. * * @return {number} The distance in radians, in the range [0, 2pi). */ var GetClockwiseDistance = function (angle1, angle2) { return NormalizeAngle(angle2 - angle1); }; module.exports = GetClockwiseDistance;