Math#clampBottom()

clampBottom(x, a) → {number} Clamp x to the range [a, Infinity).Roughly the same as Math.max(x, a), except for NaN handling. Parameters Name Type Description x number a number Returns number - Source code: math/Math.js (Line 1054)

Math#clamp()

clamp(v, min, max) → {number} Force a value within the boundaries by clamping it to the range min, max. Parameters Name Type Description v float The value to be clamped. min float The minimum bounds. max float The maximum bounds. Returns number - The clamped value. Source code: math/Math.js (Line 1028)

Math#ceilTo()

ceilTo(value, place, base) → {number} Ceils to some place comparative to a base, default is 10 for decimal place.The place is represented by the power applied to base to get that place. Parameters Name Type Argument Default Description value number The value to round. place number <optional> 0 The place to round to. base number <optional> 10 The base to round in. Default is 10 for decimal. Returns number - The rounded value. Source code: math/Math.js (Line

Math#catmullRomInterpolation()

catmullRomInterpolation(v, k) → {number} A Catmull Rom Interpolation Method, mostly used by Phaser.Tween. Parameters Name Type Description v Array The input array of values to interpolate between. k number The percentage of interpolation, between 0 and 1. Returns number - The interpolated value Source code: math/Math.js (Line 791)

Math#bezierInterpolation()

bezierInterpolation(v, k) → {number} A Bezier Interpolation Method, mostly used by Phaser.Tween. Parameters Name Type Description v Array The input array of values to interpolate between. k number The percentage of interpolation, between 0 and 1. Returns number - The interpolated value Source code: math/Math.js (Line 769)

Math#between()

between(min, max) → {number} Returns a number between the min and max values. Parameters Name Type Description min number The minimum value. Must be positive, and less than 'max'. max number The maximum value. Must be position, and greater than 'min'. Returns number - A value between the range min to max. Source code: math/Math.js (Line 26)

Math#average()

average() → {number} Averages all values passed to the function and returns the result. Returns number - The average of all given values. Source code: math/Math.js (Line 123)

Math#angleBetweenY()

angleBetweenY(x1, y1, x2, y2) → {number} Find the angle of a segment from (x1, y1) -> (x2, y2). The difference between this method and Math.angleBetween is that this assumes the y coordinate travelsdown the screen. Parameters Name Type Description x1 number The x coordinate of the first value. y1 number The y coordinate of the first value. x2 number The x coordinate of the second value. y2 number The y coordinate of the second value. Returns number - The angle, in radians.

Math#angleBetweenPointsY()

angleBetweenPointsY(point1, point2) → {number} Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y). Parameters Name Type Description point1 Phaser.Point point2 Phaser.Point Returns number - The angle, in radians. Source code: math/Math.js (Line 453)

Math#angleBetweenPoints()

angleBetweenPoints(point1, point2) → {number} Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y). Parameters Name Type Description point1 Phaser.Point The first point. point2 Phaser.Point The second point. Returns number - The angle between the two points, in radians. Source code: math/Math.js (Line 439)