API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classInterval
@codexo/exojs / math / stable
A closed scalar interval `[min, max]` used by the SAT collision solver to represent the projection of a shape onto a separating axis. `Interval.temp` provides a shared scratch instance for hot paths. `Interval.zero` is a read-only `[0, 0]` sentinel.
4
props
8
methods
0
events
Import
import { Interval } from '@codexo/exojs'A closed scalar interval `[min, max]` used by the SAT collision solver to represent the projection of a shape onto a separating axis.
`Interval.temp` provides a shared scratch instance for hot paths. `Interval.zero` is a read-only `[0, 0]` sentinel.
Constructors1
new(min: number, max: number): IntervalMethods8
clone(): thiscontainsInterval(interval: Interval): booleanReturn true when interval is strictly contained within this interval (exclusive bounds).
copy(interval: Interval): thisdestroy(): voidgetOverlap(interval: Interval): numberReturn the signed overlap length between this interval and interval. Positive when they overlap; the sign encodes which end overlaps more. Used by the SAT solver to compute penetration depth.
includes(value: number): booleanReturn true when value lies within [min, max] (inclusive).
overlaps(interval: Interval): booleanReturn true when this interval and interval share at least one point.
set(min: number, max: number): thisProperties4
max: numbermin: numberzero: Intervaltemp: IntervalSource