You are here

private static function SassScriptFunctions::inRange in Sassy 7

Same name and namespace in other branches
  1. 7.3 phpsass/script/SassScriptFunctions.php \SassScriptFunctions::inRange()

* Ensures the value is within the given range, clipping it if needed. *

Parameters

float the value to test: * @param float the minimum value * @param float the maximum value * @return the value clipped to the range

1 call to SassScriptFunctions::inRange()
SassScriptFunctions::adjust in phamlp/sass/script/SassScriptFunctions.php
* Adjusts the colour *

File

phamlp/sass/script/SassScriptFunctions.php, line 748

Class

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

Code

private static function inRange($value, $min, $max) {
  return $value < $min ? $min : ($value > $max ? $max : $value);
}