유틸리티 함수 추가

This commit is contained in:
2018-08-18 16:59:34 +09:00
parent bc33e6fe66
commit 0cca2d5bda
2 changed files with 28 additions and 0 deletions
+8
View File
@@ -12,6 +12,14 @@ class Util extends \utilphp\util
return intval(round($value));
}
/**
* int 값으로 강제로 설정하는 부동소수점 반올림
* @param int|float $value
*/
public static function setRound(&$value) : void{
$value = static::round($value);
}
private static function _parseReq($value, string $type)
{
if (is_array($value)) {