Files
modeling-app/src/lib/utils.ts

8 lines
224 B
TypeScript
Raw Normal View History

import { Range } from '../useStore'
export const isOverlapping = (a: Range, b: Range) => {
2022-11-26 08:34:23 +11:00
const startingRange = a[0] < b[0] ? a : b
const secondRange = a[0] < b[0] ? b : a
return startingRange[1] >= secondRange[0]
}