Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques | |
getNumerator () | |
getDenominator () | |
quotient () | |
remainder () | |
quotientAndRemainder () | |
plus ($that) | |
minus ($that) | |
multipliedBy ($that) | |
dividedBy ($that) | |
power (int $exponent) | |
reciprocal () | |
abs () | |
negated () | |
simplified () | |
compareTo ($that) | |
getSign () | |
toBigInteger () | |
toBigDecimal () | |
toBigRational () | |
toScale (int $scale, int $roundingMode=RoundingMode::UNNECESSARY) | |
toInt () | |
toFloat () | |
__toString () | |
serialize () | |
unserialize ($value) | |
Fonctions membres publiques hérités de BigNumber | |
isEqualTo ($that) | |
isLessThan ($that) | |
isLessThanOrEqualTo ($that) | |
isGreaterThan ($that) | |
isGreaterThanOrEqualTo ($that) | |
isZero () | |
isNegative () | |
isNegativeOrZero () | |
isPositive () | |
isPositiveOrZero () | |
getSign () | |
compareTo ($that) | |
toBigInteger () | |
toBigDecimal () | |
toBigRational () | |
toScale (int $scale, int $roundingMode=RoundingMode::UNNECESSARY) | |
toInt () | |
toFloat () | |
__toString () | |
jsonSerialize () | |
Fonctions membres publiques statiques | |
static | of ($value) |
static | nd ($numerator, $denominator) |
static | zero () |
static | one () |
static | ten () |
Fonctions membres publiques statiques hérités de BigNumber | |
static | of ($value) |
static | min (... $values) |
static | max (... $values) |
Fonctions membres protégées | |
__construct (BigInteger $numerator, BigInteger $denominator, bool $checkDenominator) | |
Attributs privés | |
$numerator | |
$denominator | |
Membres hérités additionnels | |
Fonctions membres protégées statiques hérités de BigNumber | |
static | create (... $args) |
An arbitrarily large rational number.
This class is immutable.
-immutable
|
protected |
Protected constructor. Use a factory method to obtain an instance.
BigInteger | $numerator | The numerator. |
BigInteger | $denominator | The denominator. |
bool | $checkDenominator | Whether to check the denominator for negative and zero. |
DivisionByZeroException | If the denominator is zero. |
Références BigRational\$denominator, BigRational\$numerator, et DivisionByZeroException\denominatorMustNotBeZero().
__toString | ( | ) |
{}
Références BigRational\$denominator, et BigRational\$numerator.
abs | ( | ) |
Returns the absolute value of this BigRational.
Références BigRational\$denominator.
compareTo | ( | $that | ) |
{}
Références BigRational\minus().
dividedBy | ( | $that | ) |
Returns the result of the division of this number by the given one.
BigNumber | int | float | string | $that | The divisor. |
MathException | If the divisor is not a valid number, or is zero. |
Références BigRational\$denominator, BigRational\$numerator, et BigRational\of().
getDenominator | ( | ) |
Références BigRational\$denominator.
getNumerator | ( | ) |
Références BigRational\$numerator.
getSign | ( | ) |
{}
minus | ( | $that | ) |
Returns the difference of this number and the given one.
BigNumber | int | float | string | $that | The number to subtract. |
MathException | If the number is not valid. |
Références BigRational\$denominator, BigRational\$numerator, $this, et BigRational\of().
Référencé par BigRational\compareTo().
multipliedBy | ( | $that | ) |
Returns the product of this number and the given one.
BigNumber | int | float | string | $that | The multiplier. |
MathException | If the multiplier is not a valid number. |
Références BigRational\$denominator, BigRational\$numerator, et BigRational\of().
|
static |
Creates a BigRational out of a numerator and a denominator.
If the denominator is negative, the signs of both the numerator and the denominator will be inverted to ensure that the denominator is always positive.
BigNumber | int | float | string | $numerator | The numerator. Must be convertible to a BigInteger. |
BigNumber | int | float | string | $denominator | The denominator. Must be convertible to a BigInteger. |
NumberFormatException | If an argument does not represent a valid number. |
RoundingNecessaryException | If an argument represents a non-integer number. |
DivisionByZeroException | If the denominator is zero. |
-pure
Références BigRational\$denominator, BigRational\$numerator, et BigInteger\of().
negated | ( | ) |
Returns the negated value of this BigRational.
Références BigRational\$denominator.
|
static |
Creates a BigRational of the given value.
BigNumber | int | float | string | $value |
MathException | If the value cannot be converted to a BigRational. |
-pure
Références $value, et BigNumber\toBigRational().
Référencé par BigRational\dividedBy(), BigRational\minus(), BigRational\multipliedBy(), et BigRational\plus().
|
static |
Returns a BigRational representing one.
-pure
-suppress ImpureStaticVariable
Références null, et BigInteger\one().
plus | ( | $that | ) |
Returns the sum of this number and the given one.
BigNumber | int | float | string | $that | The number to add. |
MathException | If the number is not valid. |
Références BigRational\$denominator, BigRational\$numerator, $this, et BigRational\of().
power | ( | int | $exponent | ) |
Returns this number exponentiated to the given value.
int | $exponent | The exponent. |
Références $this, false, et BigInteger\one().
quotient | ( | ) |
Returns the quotient of the division of the numerator by the denominator.
quotientAndRemainder | ( | ) |
Returns the quotient and remainder of the division of the numerator by the denominator.
reciprocal | ( | ) |
Returns the reciprocal of this BigRational.
The reciprocal has the numerator and denominator swapped.
DivisionByZeroException | If the numerator is zero. |
remainder | ( | ) |
Returns the remainder of the division of the numerator by the denominator.
serialize | ( | ) |
This method is required by interface Serializable and SHOULD NOT be accessed directly.
Références BigRational\$denominator.
simplified | ( | ) |
Returns the simplified value of this BigRational.
Références BigRational\$denominator, et BigRational\$numerator.
Référencé par BigRational\toBigInteger().
|
static |
Returns a BigRational representing ten.
-pure
-suppress ImpureStaticVariable
Références null, BigInteger\one(), et BigInteger\ten().
toBigDecimal | ( | ) |
{}
Références BigDecimal\toBigDecimal().
toBigInteger | ( | ) |
toBigRational | ( | ) |
{}
Références $this.
toFloat | ( | ) |
{}
toInt | ( | ) |
{}
Références BigRational\toBigInteger().
toScale | ( | int | $scale, |
int | $roundingMode = RoundingMode::UNNECESSARY |
||
) |
{}
Références BigDecimal\toBigDecimal().
unserialize | ( | $value | ) |
This method is only here to implement interface Serializable and cannot be accessed directly.
Références BigRational\$denominator, BigRational\$numerator, $value, et BigInteger\of().
|
static |
Returns a BigRational representing zero.
-pure
-suppress ImpureStaticVariable
Références null, BigInteger\one(), et BigInteger\zero().
|
private |
Référencé par BigRational\__construct(), BigRational\__toString(), BigRational\abs(), BigRational\dividedBy(), BigRational\getDenominator(), BigRational\minus(), BigRational\multipliedBy(), BigRational\nd(), BigRational\negated(), BigRational\plus(), BigRational\serialize(), BigRational\simplified(), et BigRational\unserialize().
|
private |