public static function SassScriptFunctions::floor in Sassy 7
Same name and namespace in other branches
- 7.3 phpsass/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 new SassNumber The rounded number * @throws SassScriptFunctionException If $value is not a number
File
- phamlp/
sass/ script/ SassScriptFunctions.php, line 596
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);
}