Point#angle()

angle(a, asDegrees) → {number} Returns the angle between this Point object and another object with public x and y properties. Parameters Name Type Argument Default Description a Phaser.Point | any The object to get the angle from this Point to. asDegrees boolean <optional> false Is the given angle in radians (false) or degrees (true)? Returns number - The angle between the two objects. Source code: geom/Point.js (Line 281)

Point#ceil()

ceil() → {Phaser.Point} Math.ceil() both the x and y properties of this Point. Returns Phaser.Point - This Point object. Source code: geom/Point.js (Line 463)

Point#clamp()

clamp(min, max) → {Phaser.Point} Clamps this Point object values to be between the given min and max. Parameters Name Type Description min number The minimum value to clamp this Point to. max number The maximum value to clamp this Point to. Returns Phaser.Point - This Point object. Source code: geom/Point.js (Line 200)

Point#clampX()

clampX(min, max) → {Phaser.Point} Clamps the x value of this Point to be between the given min and max. Parameters Name Type Description min number The minimum value to clamp this Point to. max number The maximum value to clamp this Point to. Returns Phaser.Point - This Point object. Source code: geom/Point.js (Line 170)

Point#clampY()

clampY(min, max) → {Phaser.Point} Clamps the y value of this Point to be between the given min and max Parameters Name Type Description min number The minimum value to clamp this Point to. max number The maximum value to clamp this Point to. Returns Phaser.Point - This Point object. Source code: geom/Point.js (Line 185)

Point#clone()

clone(output) → {Phaser.Point} Creates a copy of the given Point. Parameters Name Type Argument Description output Phaser.Point <optional> Optional Point object. If given the values will be set into this object, otherwise a brand new Point object will be created and returned. Returns Phaser.Point - The new Point object. Source code: geom/Point.js (Line 216)

Point#copyFrom()

copyFrom(source) → {Phaser.Point} Copies the x and y properties from any given object to this Point. Parameters Name Type Description source any The object to copy from. Returns Phaser.Point - This Point object. Source code: geom/Point.js (Line 43)

Point#copyTo()

copyTo(dest) → {object} Copies the x and y properties from this Point to any given object. Parameters Name Type Description dest any The object to copy to. Returns object - The dest object. Source code: geom/Point.js (Line 238)

Point#cross()

cross(a) → {number} The cross product of this and another Point object. Parameters Name Type Description a Phaser.Point The Point object to get the cross product combined with this Point. Returns number - The result. Source code: geom/Point.js (Line 402)

Point#distance()

distance(dest, round) → {number} Returns the distance of this Point object to the given object (can be a Circle, Point or anything with x/y properties) Parameters Name Type Argument Description dest object The target object. Must have visible x and y properties that represent the center of the object. round boolean <optional> Round the distance to the nearest integer (default false). Returns number - The distance between this Point object and the destination Point object.