跳到主要内容

KLine2d.onLeftSide() method

检查一个点是不是在直线的左侧。

Check whether a point is on the left side of the line.

Signature:

onLeftSide(point: KPoint2d, tol?: number): boolean;

Links: onLeftSide(point: KPoint2d, tol?: number): boolean;

Parameters

Parameter

Type

Description

point

KPoint2d

待检查的点。

Point to check.

tol

number

(Optional) 距离容差。如果没有给定,则采用全局容差。

distance tolerance. If it is not provided, then global tolerance is used.

Returns:

boolean

如果点在直线左侧则返回真,否则为假。

True, if the point is on the left side of the line, otherwise false.