KInterval.union() method
合并当前区间和另外一个区间,返回叠加在一起后的区间。如果两个区间不相交,则返回一个不合法区间。
Combine the current interval and the other interval, return a new interval. If two intervals are not intersected, then return an invalid interval.
Signature:
union(interval: KInterval): KInterval;
Parameters
Parameter | Type | Description |
---|---|---|
interval | 另外一个区间。 The other interval. |
Returns:
合并后的区间。如果两个区间不相交,则返回一个不合法区间。
A new interval which has combined the two intervals. If two intervals are not intersected, then return an invalid interval.