diff --git a/src/sammo/Util.php b/src/sammo/Util.php index e4ec5287..b0b9a61f 100644 --- a/src/sammo/Util.php +++ b/src/sammo/Util.php @@ -486,6 +486,14 @@ class Util extends \utilphp\util * $min과 $max 사이의 값으로 교정 */ public static function valueFit($value, $min = null, $max = null) + { + return static::clamp($value, $min, $max); + } + + /** + * $min과 $max 사이의 값으로 교정 + */ + public static function clamp($value, $min = null, $max = null) { if($max !== null && $min !== null && $max < $min){ return $min;