MCPcopy Index your code
hub / github.com/dataease/SQLBot / _intersect

Method _intersect

frontend/public/swagger-ui-bundle.js:26687–26694  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

26685 intersect(s, o) {
26686 var i = [],
26687 _intersect = (s) => {
26688 for (var o = 0; o < this.ranges.length && !s.overlaps(this.ranges[o]); ) o++
26689 for (; o < this.ranges.length && s.overlaps(this.ranges[o]); ) {
26690 var a = Math.max(this.ranges[o].low, s.low),
26691 u = Math.min(this.ranges[o].high, s.high)
26692 ;(i.push(new SubRange(a, u)), o++)
26693 }
26694 }
26695 return (
26696 s instanceof DRange
26697 ? s.ranges.forEach(_intersect)

Callers

nothing calls this directly

Calls 2

overlapsMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected