public function additiveInverse(): Decimal
    {
        if ($this->isZero()) {
            return $this;
        } elseif ($this->isNegative()) {
            $value = \substr($this->value, 1);
        } else { // if ($this->isPositive()) {
            $value = '-' . $this->value;
        }

        return new static($value, $this->scale);
    }
public function additiveInverse(): Decimal
    {
        if ($this->isZero()) {
            return $this;
        } elseif ($this->isNegative()) {
            $value = \substr($this->value, 1);
        } else { // if ($this->isPositive()) {
            $value = '-' . $this->value;
        }

        return new static($value, $this->scale);
    }
public function additiveInverse ( ) : Decimal { if ( $ this -> isZero ( ) ) { return $ this ; } elseif ( $ this -> isNegative ( ) ) { $ value = \ substr ( $ this -> value , 1 ) ; } else { // if ($this->isPositive()) { $ value = '-' . $ this -> value ; } return new static ( $ value , $ this -> scale ) ; }
Returns the element's additive inverse.
@return Decimal
Returns the element s additive inverse .