跳到主要内容

KPoint2d.distanceTo() method

求当前点到另一个点的距离。

Get the distance to another point.

Signature:

distanceTo(other: KPoint2d): number;

Links: distanceTo(other: KPoint2d): number;

Parameters

Parameter

Type

Description

other

KPoint2d

另外一个点。

The other point.

Returns:

number

两点之间距离。

The distance between the two points.