Index

Number

MMO\math\helpers · 1 symbol · generated 30 Sep 2026

class

Number

Number.php:13
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

domain

protected ?MMO\math\helpers\Domain $domain = null
Type
null | Domain

listeners

protected array $listeners = []
Type
array

polynomeUnit

protected ?MMO\math\helpers\UnitNumber $polynomeUnit = null
Type
null | UnitNumber

units

protected ?MMO\math\helpers\Units $units = null
Type
null | Units

value

protected int|float|null $value = null
Type
int | float | null

Methods29

multiplyBy($factor)

Number.php:195

Return a clone of this number multiply by $factor

function multiplyBy(MMO\math\interfaces\iNumber|int|float $factor): MMO\math\interfaces\iNumber|int
$factoriNumber | int | float
returnsiNumber | int

powerBy($power)

Number.php:178

Return a clone of this number to the power of $power

function powerBy(float $power): MMO\math\interfaces\iNumber|int
$powerfloat
returnsiNumber | int

__construct($value, $units)

Number.php:26
function __construct( int|float|null $value = null, MMO\math\interfaces\iUnit|MMO\math\helpers\UnitVector|MMO\math\helpers\Units|string|null $units = null )
$value = nullint | float | null
$units = nulliUnit | UnitVector | Units | string | null