跳到主要内容

KInterval.containsInterval() method

判断当前区间是否包含另外一个区间。

Check whether the current interval contains the other interval.

Signature:

containsInterval(interval: KInterval, includeEnds: boolean, disTol?: number): boolean;

Links: containsInterval(interval: KInterval, includeEnds: boolean, disTol?: number): boolean;

Parameters

Parameter

Type

Description

interval

KInterval

是否被当前区间包含的另一个区间。

The other interval to be checked.

includeEnds

boolean

是否把两个区间当作是闭区间。

Whether take the two intervals as closed.

disTol

number

(Optional) 用于判断包含关系的容差。如果没有给定则采用全局距离容差。

The tolerance used to check the value is containded by the interval. If it is not provided, global distance tolerance will be used.

Returns:

boolean

如果当前区间包含输入的区间,则返回真,否则为假。

True, if current interval contains the other interval, otherwise false.