public static function SassScriptFunctions::comparable in Sassy 7
Same name and namespace in other branches
- 7.3 phpsass/script/SassScriptFunctions.php \SassScriptFunctions::comparable()
* Returns true if two numbers are similar enough to be added, subtracted, * or compared. *
Parameters
SassNumber The first number to test: * @param SassNumber The second number to test * @return new SassBoolean True if the numbers are similar * @throws SassScriptFunctionException If $number1 or $number2 is not * a number
File
- phamlp/
sass/ script/ SassScriptFunctions.php, line 625
Class
- SassScriptFunctions
- SassScript functions class. A collection of functions for use in SassSCript. @package PHamlP @subpackage Sass.script
Code
public static function comparable($number1, $number2) {
SassLiteral::assertType($number1, 'SassNumber');
SassLiteral::assertType($number2, 'SassNumber');
return new SassBoolean($number1
->isComparableTo($number2));
}