KInterval.contains() method
判断当前区间是否包含某个数值。
Check whether the interval contains a value.
Signature:
contains(point: number, includeEnds: boolean, disTol?: number): boolean;
Parameters
Parameter | Type | Description |
---|---|---|
point | number | 要检查的数值。 The value to check. |
includeEnds | boolean | 是否把当前区间当作是闭区间。 Whether take the interval 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 the interval contains the value, otherwise false.