diff options
author | Mario <mario@mariovavti.com> | 2022-10-11 18:34:03 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2022-10-11 18:34:03 +0000 |
commit | 108a3efe0b6d37a7ed394a84c69b924ca727f17a (patch) | |
tree | ed9904767622d769fcee883d407310087ed7d57a /vendor/brick/math/src/BigRational.php | |
parent | ccd826f63a7a4c7e442fab8a70d9c4c84808b417 (diff) | |
download | volse-hubzilla-108a3efe0b6d37a7ed394a84c69b924ca727f17a.tar.gz volse-hubzilla-108a3efe0b6d37a7ed394a84c69b924ca727f17a.tar.bz2 volse-hubzilla-108a3efe0b6d37a7ed394a84c69b924ca727f17a.zip |
update composer libs
Diffstat (limited to 'vendor/brick/math/src/BigRational.php')
-rw-r--r-- | vendor/brick/math/src/BigRational.php | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/vendor/brick/math/src/BigRational.php b/vendor/brick/math/src/BigRational.php index bee094f73..46257814d 100644 --- a/vendor/brick/math/src/BigRational.php +++ b/vendor/brick/math/src/BigRational.php @@ -20,17 +20,13 @@ final class BigRational extends BigNumber { /** * The numerator. - * - * @var BigInteger */ - private $numerator; + private BigInteger $numerator; /** * The denominator. Always strictly positive. - * - * @var BigInteger */ - private $denominator; + private BigInteger $denominator; /** * Protected constructor. Use a factory method to obtain an instance. @@ -433,7 +429,8 @@ final class BigRational extends BigNumber */ public function toFloat() : float { - return $this->numerator->toFloat() / $this->denominator->toFloat(); + $simplified = $this->simplified(); + return $simplified->numerator->toFloat() / $simplified->denominator->toFloat(); } /** |