game/_incl_data/class/Core/ComparsionHelper.php

17 lines
296 B
PHP

<?php
namespace Core;
class ComparsionHelper
{
public static function minimax($value, $minimum, $maximum)
{
if ($value < $minimum) {
$value = $minimum;
}
if ($value > $maximum) {
$value = $maximum;
}
return $value;
}
}