public static function SassScriptFunctions::floor in Sassy 7.3
Same name and namespace in other branches
- 7 phamlp/sass/script/SassScriptFunctions.php \SassScriptFunctions::floor()
Rounds down to the nearest whole number. For example: floor(10.4px) => 10px floor(10.6px) => 10px
Parameters
SassNumber The number to round:
Return value
new SassNumber The rounded number
Throws
SassScriptFunctionException If $value is not a number
File
- phpsass/
script/ SassScriptFunctions.php, line 603
Class
- SassScriptFunctions
- SassScript functions class. A collection of functions for use in SassSCript. @package PHamlP @subpackage Sass.script
Code
public static function floor($number) {
SassLiteral::assertType($number, 'SassNumber');
return new SassNumber(floor($number->value) . $number->units);
}