You are here

public static function TwigConvert::floatValue in Twig Tools 8

Returns the float value of a passed variable.

Parameters

mixed $value: The variable to get the float equivalent value of.

Return value

float The float value equivalent of the variable.

File

src/TwigExtension/TwigConvert.php, line 67

Class

TwigConvert
Class TwigConvert.

Namespace

Drupal\twig_tools\TwigExtension

Code

public static function floatValue($value) {
  return floatval($value);
}