Interval
MMO\math\helpers · 1 symbol · generated 30 Sep 2026
class MMO\math\helpers\Interval
implements MMO\math\interfaces\iDomain,
IteratorAggregate,
Stringable- Namespace
MMO\math\helpers- Implements
- iDomain, IteratorAggregate, Stringable
Index
| CONTAIN | |
| END_AFTER | |
| END_BEFORE | |
| INSIDE | |
| LEFT | |
| LEFT_OVERFLOW | |
| RIGHT | |
| RIGHT_OVERFLOW | |
| START_AFTER | |
| START_BEFORE | |
| end readonly | |
| includeEnd readonly | |
| includeStart readonly | |
| start readonly | |
| storage | |
| addStorage($storage) | |
| attach($object, $info) | |
| computeLeft($operator, $value) | Do an operation on the start and end of this interval using the value at the start of the computing ($value * $this) |
| computeRight($operator, $value) | Do an operation on the start and end of this interval using the value at the end of the computing ($this * $value) |
| contains($value) | |
| debugName() | |
| distance($value) | |
| Empty() static | |
| exclude($value) | Exclusion |
| freeStorage() | |
| FromDates($start, $end, $ignoreTime, $includeStart, $includeEnd) static | Create an interval from dates |
| FromValue($value, $isIncluded) static | |
| getIterator($step, $scale, $reverse) | |
| getStorage($create) | |
| hasStorage() | |
| Infinity() static | |
| intersect($value) | Intersection |
| intervals() | |
| inverse() | Inverse |
| isEmpty() | |
| isEqual($value) | |
| jsonSerialize() | |
| limit() | |
| norm() | |
| normalize() | Get a normal vector from this interval (start at 0, with a length of [0,1]) |
| offsetBy($offset) | |
| overlap($value) | |
| position($value) | |
| size() | |
| storageObjects() | |
| union($value) | Union |
| withEnd($end, $includeEnd) | |
| withStart($start, $includeStart) | |
| __clone() | |
| __construct($start, $end, $includeStart, $includeEnd) | |
| __toString() | |
Constants10
const CONTAIN = 9const END_AFTER = 8const END_BEFORE = 2const INSIDE = 0const LEFT = 3const LEFT_OVERFLOW = 1const RIGHT = 12const RIGHT_OVERFLOW = 8const START_AFTER = 4const START_BEFORE = 1Properties5
readonly float $end- Type
- float
readonly bool $includeEnd- Type
- bool
readonly bool $includeStart- Type
- bool
readonly float $start- Type
- float
protected ?SplObjectStorage $storage = null- Type
- null | SplObjectStorage
Methods36
function addStorage(SplObjectStorage $storage): voidfunction attach(object $object, mixed $info = null): voidDo an operation on the start and end of this interval using the value at the start of the computing ($value * $this)
function computeLeft(callable $operator, self|int|float $value): staticDo an operation on the start and end of this interval using the value at the end of the computing ($this * $value)
function computeRight(callable $operator, self|int|float $value): staticfunction contains(MMO\math\interfaces\iSimpleDomain|float $value): boolfunction debugName(): stringfunction distance(MMO\math\helpers\Interval $value): floatstatic function Empty(): selfExclusion
function exclude(self|float $value): MMO\math\helpers\Domain|selffunction freeStorage(): voidFromDates($start, $end, $ignoreTime, $includeStart, $includeEnd)
staticInterval.php:69Create an interval from dates
static function FromDates(
?DateTimeInterface $start,
?DateTimeInterface $end,
bool $ignoreTime = false,
bool $includeStart = true,
bool $includeEnd = true
): selfstatic function FromValue(float $value, bool $isIncluded = true): selffunction getIterator(int|float $step = 1, ?int $scale = null, bool $reverse = false): MMO\math\iterators\DomainIteratorfunction getStorage(bool $create = false): ?SplObjectStoragefunction hasStorage(): boolstatic function Infinity(): selfIntersection
function intersect(self|float $value): selffunction intervals(): arrayInverse
function inverse(): MMO\math\helpers\Domain|selffunction isEmpty(): boolfunction isEqual(MMO\math\interfaces\iSimpleDomain|float $value): boolfunction jsonSerialize(): mixedfunction limit(): MMO\math\helpers\Intervalfunction norm(): floatGet a normal vector from this interval (start at 0, with a length of [0,1])
function normalize(): selffunction offsetBy(float $offset): selffunction overlap(MMO\math\interfaces\iSimpleDomain|float $value): boolfunction position(MMO\math\helpers\Interval|float $value): intfunction size(): floatfunction storageObjects(): arrayUnion
function union(self|float $value): MMO\math\helpers\Domain|selffunction withEnd(float $end, ?bool $includeEnd = null): staticfunction withStart(float $start, ?bool $includeStart = null): staticfunction __clone()function __construct(
float $start,
float $end,
bool $includeStart = true,
bool $includeEnd = true
)function __toString(): string