KInterval.intersects() method
判断当前区间是否和另外一个区间相交。
Check whther the current interval intersects with the other interval.
Signature:
intersects(interval: KInterval, includeEnds: boolean, disTol?: number): boolean;
Links: intersects(interval: KInterval, includeEnds: boolean, disTol?: number): boolean;
Parameters
Parameter | Type | Description |
---|---|---|
interval | 输入另一个区间。 The other interval. | |
includeEnds | boolean | 是否把两个区间当作是闭区间。 Whether take the two intervals as closed. |
disTol | number | (Optional) 用于判断相交关系的容差。如果没有给定则采用全局距离容差。 The tolerance used to check the two intervals are intersected. If it is not provided, global distance tolerance will be used. |
Returns:
boolean
返回两个区间是否有交。
Reture true if two intervals have common parts.