distance

external fun distance(left: Cartesian2, right: Cartesian2): Double(source)

Computes the distance between two points.

// Returns 1.0
const d = Cartesian2.distance(new Cartesian2(1.0, 0.0), new Cartesian2(2.0, 0.0));

Return

The distance between two points.

Parameters

left

The first point to compute the distance from.

right

The second point to compute the distance to.

See also