跳到主要内容

KPoint2d.squaredDistanceTo() method

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

Get the distance to another point.

Signature:

squaredDistanceTo(other: KPoint2d): number;

Links: squaredDistanceTo(other: KPoint2d): number;

Parameters

Parameter

Type

Description

other

KPoint2d

另外一个点。

The other point.

Returns:

number

两点之间平方距离。

The square distance between the two points.