You are here

public static function SassScriptFunctions::inRange in Sassy 7.3

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

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

Parameters

float the value to test:

float the minimum value:

float the maximum value:

Return value

the value clipped to the range

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

File

phpsass/script/SassScriptFunctions.php, line 779

Class

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

Code

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