Check if value is float (is_float)

@return $this
@throws InvalidFloatException
188175
public function float()
    {
        if (!is_float($this->value)) {
            throw new InvalidFloatException($this->name, $this->value);
        }

        return $this;
    }
1160516
public static function isFloat($value, $message = null)
    {
        if (!is_float($value)) {
            throw new InvalidArgumentException(sprintf(
                $message ?: 'Expected float, but got %s',
                Helper::typeToString($value)
            ));
        }
    }
578355
private static function validateNaturalFloat($key, $value)
    {
        $value = filter_var($value, FILTER_VALIDATE_FLOAT);
        if ($value === false) {
            throw new \InvalidArgumentException("Option[$key] must be float.");
        }
        if ($value < 0.0) {
            throw new \DomainException("Option[$key] must be positive or zero.");
        }
        return $value;
    }
175634
def validate(self, value):
        
        if isinstance(value, (str, unicode, int, long)):
            value = float(value)
        value = super(Float, self).validate(value)
        if not isinstance(value, (float)):
            raise ValueError("Not an float: %r" % (value, ))
        return value
564059
public function isNumeric()
    {
        return ($this->IsNull()) ? false : ($this->baseType === BaseType::INTEGER || $this->baseType === BaseType::FLOAT);
    }
90756
public static function isFloat(&$var = null): bool
    {
        $parse = filter_var($var, FILTER_VALIDATE_FLOAT);
        if ($parse !== false) {
            $var = $parse;
            return true;
        }
        return false;
    }
847654
public static function toFloat($o) : ?float
    {
        $o = self::toNumber($o);

        if (is_numeric($o) === true) {
            return floatval($o);
        }

        return $o;
    }
1220470
public static boolean isFloat(CharSequence self) {
        try {
            Float.valueOf(self.toString().trim());
            return true;
        } catch (NumberFormatException nfe) {
            return false;
        }
    }
1111863
public function getAmount() : ?float 
    {
        if ( ! $this->hasAmount()) {
            $this->setAmount($this->getDefaultAmount());
        }
        return $this->amount;
    }
749675
public static function isFloat($float): bool
    {
        if (!\is_scalar($float)) {
            return false;
        }

        return (string)((float)$float) === (string)$float;
    }
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");
		}
	}
982994
public float floatValue() {
        BigDecimal adivb = (new BigDecimal(a)).divide(new BigDecimal(b), MathContext.DECIMAL128);
        return adivb.floatValue();
    }
1289013
public function float($value)
    {
        if ($this->notBeEmpty($value)) {
            if (is_float($value)) {
                return true;
            } else {
                return false;
            }
        } else {
            return false;
        }
    }
359885
protected function validate_positive_float( $var, $include_zero = false, $min = null, $max = null ) {
		$validate = $this->validate_float( $var, $min, $max );
		if ( true === $validate ) {
			return $this->validate_positive( $var, $include_zero );
		}

		return $validate;
	}
381300
protected function isSoftSmall($value)
    {
        if (!is_scalar($value) || $value === null) {
            return false;
        }
        
        $value = (float) $value;
        
        return $value >= 0 && $value <= 9;
    }
759383
public function GetFloat( )
		{
			if( $this->Remaining( ) < 4 )
			{
				throw new InvalidPacketException( 'Not enough data to unpack a float.', InvalidPacketException::BUFFER_EMPTY );
			}
			
			$Data = UnPack( 'f', $this->Get( 4 ) );
			
			return $Data[ 1 ];
		}
206571
public function isValid($value)
    {
        if (!is_string($value) && !is_int($value) && !is_float($value)) {
            $this->_error(self::INVALID);
            return false;
        }

        if (is_float($value)) {
            return true;
        }

        $this->_setValue($value);
        try {
            if (!Zend_Locale_Format::isFloat($value, array('locale' => $this->_locale))) {
                $this->_error(self::NOT_FLOAT);
                return false;
            }
        } catch (Zend_Locale_Exception $e) {
            $this->_error(self::NOT_FLOAT);
            return false;
        }

        return true;
    }