Neos\Eel\Helper\MathHelper::trunc PHP Метод

trunc() публичный Метод

This function doesn't round the given number but merely calls ceil(x) or floor(x) depending on the sign of the number.
public trunc ( float $x ) : integer
$x float A number
Результат integer The integral part of the given number
    public function trunc($x)
    {
        $sign = $this->sign($x);
        switch ($sign) {
            case -1:
                return ceil($x);
            case 1:
                return floor($x);
            default:
                return $sign;
        }
    }