Matrix#b

b : number Default Value 0 Source code: geom/Matrix.js (Line 45)

Matrix#applyInverse()

applyInverse(pos, newPos) → {Phaser.Point} Get a new position with the inverse of the current transformation applied. Can be used to go from the world coordinate space to a childs coordinate space. (e.g. input) Parameters Name Type Argument Description pos Phaser.Point The origin Point. newPos Phaser.Point <optional> The point that the new position is assigned to. This can be same as input point. Returns Phaser.Point - The new point, inverse transformed through this matrix

Matrix#apply()

apply(pos, newPos) → {Phaser.Point} Get a new position with the current transformation applied. Can be used to go from a childs coordinate space to the world coordinate space (e.g. rendering) Parameters Name Type Argument Description pos Phaser.Point The origin Point. newPos Phaser.Point <optional> The point that the new position is assigned to. This can be same as input point. Returns Phaser.Point - The new point, transformed through this matrix. Source code: geom/Matri

Matrix#append()

append(matrix) → {Phaser.Matrix} Appends the given Matrix to this Matrix. Parameters Name Type Description matrix Phaser.Matrix The matrix to append to this one. Returns Phaser.Matrix - This Matrix object. Source code: geom/Matrix.js (Line 345)

Matrix#a

a : number Default Value 1 Source code: geom/Matrix.js (Line 39)

Math.PI2

<static> PI2 Twice PI. Properties: Name Type Description Phaser.Math#PI2 number Default Value ~6.283 Source code: math/Math.js (Line 24)

Math#wrapValue()

wrapValue(value, amount, max) → {number} Adds value to amount and ensures that the result always stays between 0 and max, by wrapping the value around. Values must be positive integers, and are passed through Math.abs. See Phaser.Math#wrap for an alternative. Parameters Name Type Description value number The value to add the amount to. amount number The amount to add to the value. max number The maximum the value is allowed to be. Returns number - The wrapped value. Source code

Math#wrapAngle()

wrapAngle(angle, radians) → {number} Keeps an angle value between -180 and +180; or -PI and PI if radians. Parameters Name Type Argument Default Description angle number The angle value to wrap radians boolean <optional> false Set to true if the angle is given in radians, otherwise degrees is expected. Returns number - The new angle value; will be the same as the input angle if it was within bounds. Source code: math/Math.js (Line 727)

Math#wrap()

wrap(value, min, max) → {number} Ensures that the value always stays between min and max, by wrapping the value around. If max is not larger than min the result is 0. Parameters Name Type Description value number The value to wrap. min number The minimum the value is allowed to be. max number The maximum the value is allowed to be, should be larger than min. Returns number - The wrapped value. Source code: math/Math.js (Line 521)

Math#within()

within(a, b, tolerance) → {boolean} Checks if two values are within the given tolerance of each other. Parameters Name Type Description a number The first number to check b number The second number to check tolerance number The tolerance. Anything equal to or less than this is considered within the range. Returns boolean - True if a is <= tolerance of b. Source code: math/Math.js (Line 1069) See Phaser.Math.fuzzyEqual