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.

Source code: geom/Point.js (Line 254)
doc_phaser
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.