17 lines
292 B
PHP
17 lines
292 B
PHP
<?php
|
|
|
|
namespace Helper;
|
|
|
|
class Comparsion
|
|
{
|
|
public static function minimax($value, $minimum, $maximum)
|
|
{
|
|
if ($value < $minimum) {
|
|
$value = $minimum;
|
|
}
|
|
if ($value > $maximum) {
|
|
$value = $maximum;
|
|
}
|
|
return $value;
|
|
}
|
|
} |