@param float $gamma A value between 0.01 and 9.99

@return $this

@throws InvalidManipulation
510597
public function gamma(float $gamma)
    {
        if ($gamma < 0.01 || $gamma > 9.99) {
            throw InvalidManipulation::valueNotInRange('gamma', $gamma, 0.01, 9.00);
        }

        return $this->addManipulation('gamma', $gamma);
    }
893514
public function float($msg)
    {
        if(filter_var($this->_value, FILTER_VALIDATE_FLOAT) === FALSE) {
            $this->_errors[] = $msg;
        }
        return $this;
    }
268929
private function setFloatWithinRange(?float $floatWithinRange): self
    {
        $this->updatePropertyValue(
            FloatWithinRangeFieldInterface::PROP_FLOAT_WITHIN_RANGE,
            $floatWithinRange
        );

        return $this;
    }
601112
public function pNorm(float $p = 3.)
    {
        if ($p <= 0.) {
            throw new InvalidArgumentException('P must be greater'
                . " than 0, $p given.");
        }

        return $this->abs()->powScalar($p)->sum() ** (1. / $p);
    }
472267
public function setDefault($value)
    {
        if (!is_float($value) || $value < -180 || $value > 180) {
            throw new InvalidArgumentException(
                "invalid value provided for 'value'; ".
                "expecting a float that is between -180 and 180"
            );
        }
        $this->defaultValue = $value;
        return $this;
    }
94928
public function min($value)
    {
        $v = $this->type('numeric')->value();

        if ($v === null) {
            return $this;
        }

        if ($v < $value) {
            throw new \Hail\Image\Exception\InvalidArgumentException(
                sprintf('Argument %d must be at least %s.', $this->key, $value)
            );
        }

        return $this;
    }
123564
public function setSubsetRatio(float $ratio)
    {
        if ($ratio < 0.1 || $ratio > 1.0) {
            throw new InvalidArgumentException('Subset ratio should be between 0.1 and 1.0');
        }

        $this->subsetRatio = $ratio;

        return $this;
    }
905110
public function setMinor($number)
    {
        if (!Validator::isNumber($number)) {
            throw new InvalidNumberException($number);
        }

        $this->minor = intval($number);

        return $this;
    }
537050
protected function setY($y)
	{
		if ( ! is_numeric($y) || $y < 0)
		{
			throw new \InvalidArgumentException('The value of y must be a positive numeric.');
		}
		
		$this->y = (int) $y;
		
		return $this;
	}
1011187
protected function Mod( $val )
	{
		$val = $this->getOtherValue( $val );

		if ( is_infinite( $this->_value ) || is_nan( $this->_value ) || is_nan( $val ) || $val == 0 )
		{
			return new FloatProxy( NAN );
		}

		if ( is_infinite( $val ) )
		{
			return $this;
		}

		if ( is_infinite( $val ) )
		{
			return $val;
		}

		if ( $this->_value == 0 )
		{
			return $this;
		}

		$denominator = DecimalValue::FromFloat( $val );
		$result = DecimalValue::FromFloat( $this->_value )->Mod( $denominator );
		$result = $result->ToFloat( null );
		return new FloatProxy( $result );
	}
1227494
public function setPrecision($precision)
    {
        if (! is_numeric($precision)) {
            $precision = 10; // defaults to 10 when no valid precision is given.
        }

        $this->_precision = (int) $precision;

        return $this;
    }
818450
public function quality(int $quality)
    {
        if ($quality < 0 || $quality > 100) {
            throw InvalidManipulation::valueNotInRange('quality', $quality, 0, 100);
        }

        return $this->addManipulation('quality', $quality);
    }
56131
private function internalSetValue($value)
    {
        if (is_float($value)) {
            $valueToSet = Utils::convertExponentialToString($value);
        } else {
            $valueToSet = (string)$value;
        }

        if (!is_numeric($valueToSet)) {
            throw new InvalidArgumentException('Invalid number provided: ' . $valueToSet);
        }

        // We use a slick trick to make sure the scale is respected.
        $this->value = bcadd(0, $valueToSet, $this->getScale());

        return $this;
    }
646476
public function positive()
    {
        if (!is_int($this->value) && !is_float($this->value)) {
            throw new InvalidIntOrFloatException($this->name, $this->value);
        } elseif ($this->value <= 0) {
            throw new NumberNotPositiveException($this->name, $this->value);
        }

        return $this;
    }
384664
private static function prepareFloat($number): float
	{
		if ($number === null) {
			return 0;
		} elseif (is_numeric($number)) {
			return (float) $number;
		} else {
			throw new InvalidArgumentException("Value must be a number");
		}
	}
1084243
public function limit($limit)
    {
        if (null !== $limit) {
            if (!is_numeric($limit) || $limit != (int) $limit) {
                throw new \InvalidArgumentException('The limit is not valid.');
            }
            $limit = (int) $limit;
        }

        $this->limit = $limit;

        return $this;
    }
628131
public function pixelate(int $pixelate)
    {
        if ($pixelate < 0 || $pixelate > 1000) {
            throw InvalidManipulation::valueNotInRange('pixelate', $pixelate, 0, 1000);
        }

        return $this->addManipulation('pixelate', $pixelate);
    }