You are here

public static function SassScriptFunctions::ceil in Sassy 7.3

Same name and namespace in other branches
  1. 7 phamlp/sass/script/SassScriptFunctions.php \SassScriptFunctions::ceil()

Rounds a number up to the nearest whole number. For example: ceil(10.4px) => 11px ceil(10.6px) => 11px

Parameters

SassNumber The number to round:

Return value

new SassNumber The rounded number

Throws

SassScriptFunctionException If $number is not a number

File

phpsass/script/SassScriptFunctions.php, line 588

Class

SassScriptFunctions
SassScript functions class. A collection of functions for use in SassSCript. @package PHamlP @subpackage Sass.script

Code

public static function ceil($number) {
  SassLiteral::assertType($number, 'SassNumber');
  return new SassNumber(ceil($number->value) . $number->units);
}