# woocommerce-pos/1.9.16/vendor/brick/math/src/Exception/DivisionByZeroException.php

WCPOS – Point of Sale (POS) plugin for WooCommerce, version 1.9.16. 42 lines.

- Page: https://pluginprobe.com/plugins/woocommerce-pos/1.9.16/code/vendor/brick/math/src/Exception/DivisionByZeroException.php
- Raw: https://pluginprobe.com/plugins/woocommerce-pos/1.9.16/raw/vendor/brick/math/src/Exception/DivisionByZeroException.php
- Modified: 2023-06-12T14:16:10+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/woocommerce-pos/1.9.16/code/vendor/brick/math/src/Exception/DivisionByZeroException.php#L10-L20`.

```php
<?php

declare(strict_types=1);

namespace Brick\Math\Exception;

/**
 * Exception thrown when a division by zero occurs.
 */
class DivisionByZeroException extends MathException
{
    /**
     * @return DivisionByZeroException
     *
     * @psalm-pure
     */
    public static function divisionByZero() : DivisionByZeroException
    {
        return new self('Division by zero.');
    }

    /**
     * @return DivisionByZeroException
     *
     * @psalm-pure
     */
    public static function modulusMustNotBeZero() : DivisionByZeroException
    {
        return new self('The modulus must not be zero.');
    }

    /**
     * @return DivisionByZeroException
     *
     * @psalm-pure
     */
    public static function denominatorMustNotBeZero() : DivisionByZeroException
    {
        return new self('The denominator of a rational number cannot be zero.');
    }
}

```
