wp-user-avatar
/
third-party
/
vendor
/
brick
/
math
/
src
/
Exception
/
RoundingNecessaryException.php
DivisionByZeroException.php
2 months ago
IntegerOverflowException.php
2 months ago
MathException.php
2 months ago
NegativeNumberException.php
2 months ago
NumberFormatException.php
2 months ago
RoundingNecessaryException.php
2 months ago
RoundingNecessaryException.php
21 lines
| 1 | <?php |
| 2 | |
| 3 | declare (strict_types=1); |
| 4 | namespace ProfilePressVendor\Brick\Math\Exception; |
| 5 | |
| 6 | /** |
| 7 | * Exception thrown when a number cannot be represented at the requested scale without rounding. |
| 8 | */ |
| 9 | class RoundingNecessaryException extends MathException |
| 10 | { |
| 11 | /** |
| 12 | * @return RoundingNecessaryException |
| 13 | * |
| 14 | * @psalm-pure |
| 15 | */ |
| 16 | public static function roundingNecessary(): RoundingNecessaryException |
| 17 | { |
| 18 | return new self('Rounding is necessary to represent the result of the operation at this scale.'); |
| 19 | } |
| 20 | } |
| 21 |