Point.distance()

<static> distance(a, b, round) → {number}

Returns the euclidian distance of this Point object to the given object (can be a Circle, Point or anything with x/y properties).

Parameters
Name Type Argument Default Description
a object

The target object. Must have visible x and y properties that represent the center of the object.

b object

The target object. Must have visible x and y properties that represent the center of the object.

round boolean <optional>
false

Round the distance to the nearest integer.

Returns
number -

The distance between this Point object and the destination Point object.

Source code: geom/Point.js (Line 684)
doc_phaser
2017-02-14 11:05:40
Comments
Leave a Comment

Please login to continue.