game/_incl_data/class/Helper/Comparsion.php

23 lines
438 B
PHP
Raw Normal View History

<?php
namespace Helper;
class Comparsion
{
2023-11-10 15:53:17 +00:00
/** <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
* @param $value
* @param $minimum
* @param $maximum
* @return mixed
*/
public static function minimax($value, $minimum, $maximum): mixed
{
if ($value < $minimum) {
$value = $minimum;
}
if ($value > $maximum) {
$value = $maximum;
}
return $value;
}
}