跳到主要内容

KCurve2d.getClosestPoint() method

获得在指定容差下曲线上距离传入点最近的一点。

Get the closest point on curve for the input point with specified tolerance.

Signature:

getClosestPoint(point: KPoint2d, tolerance?: number): KPoint2d;

Links: getClosestPoint(point: KPoint2d, tolerance?: number): KPoint2d;

Parameters

Parameter

Type

Description

point

KPoint2d

传入点。

The input point.

tolerance

number

(Optional) 指定容差,默认容差是1e-6。

The specified tolerance.The default value is 1e-6.

Returns:

KPoint2d

最近点。

The closest point.