Number
MMO\math\helpers · 1 symbol · generated 30 Sep 2026
class MMO\math\helpers\Number
implements MMO\math\interfaces\iFactorableNumber,
MMO\math\interfaces\iSimpleDomain,
MMO\math\interfaces\iListenable,
Stringable- Namespace
MMO\math\helpers- Implements
- iFactorableNumber, iSimpleDomain, iListenable, Stringable
Properties5
protected ?MMO\math\helpers\Domain $domain = null- Type
- null | Domain
protected array $listeners = []- Type
- array
protected ?MMO\math\helpers\UnitNumber $polynomeUnit = null- Type
- null | UnitNumber
protected ?MMO\math\helpers\Units $units = null- Type
- null | Units
protected int|float|null $value = null- Type
- int | float | null
Methods29
function addListener(callable $callable, ?object $target = null): voidfunction compareTo(mixed $value): int|boolfunction convert(MMO\math\helpers\Units $units): staticfunction createOperation(
MMO\math\enums\cConstraintOperator|MMO\math\enums\cArithmeticOperator|string $operator,
MMO\math\interfaces\iNumber|int|float $value
): MMO\math\operations\ArithmeticOperation|MMO\math\operations\ConstraintOperationfunction divideBy(MMO\math\interfaces\iNumber|int|float $factor): MMO\math\interfaces\iNumber|intstatic function FromDateInterval(DateInterval|string $interval): staticstatic function FromDateTime(DateTimeInterface $datetime): staticfunction getDomain(): ?MMO\math\helpers\Domainfunction getName(): ?stringfunction hasDomain(): boolfunction hasUnits(): boolfunction intervals(): arrayfunction isSet(): boolfunction isTime(): boolReturn a clone of this number multiply by $factor
function multiplyBy(MMO\math\interfaces\iNumber|int|float $factor): MMO\math\interfaces\iNumber|intfunction numberValue(): int|float|nullfunction polynomeUnit(): MMO\math\helpers\UnitNumberReturn a clone of this number to the power of $power
function powerBy(float $power): MMO\math\interfaces\iNumber|intfunction removeListener(callable|object $callable): voidfunction setDomain(
MMO\math\helpers\Domain|MMO\math\helpers\Interval|array|float|null $domain
): voidfunction setName(string $name): selffunction setUnits(
MMO\math\interfaces\iUnit|MMO\math\helpers\UnitVector|MMO\math\helpers\Units|string|null $units
): voidfunction setValue(int|float|null $value): boolfunction standard(): MMO\math\interfaces\iNumber|float|nullfunction triggerListeners(): voidfunction units(): ?MMO\math\helpers\Unitsfunction __clone()function __construct(
int|float|null $value = null,
MMO\math\interfaces\iUnit|MMO\math\helpers\UnitVector|MMO\math\helpers\Units|string|null $units = null
)function __toString(): string