| 1 |
<?php |
| 2 |
|
| 3 |
declare (strict_types=1); |
| 4 |
namespace Dudlewebs\WPMCS\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 |
|