<?php
declare(strict_types=1);

namespace FiloBlu\Refilo\Model;

/**
 * Rounds num towards zero when it is half way there, making 1.5 into 1 and -1.5 into -1.
 */
class RoundHalfDownStrategy implements  RoundingStrategyInterface {

    /**
     * @param $value
     * @param $decimals
     * @return float
     */
    public function round($value, $decimals)
    {
        return round($value, $decimals, PHP_ROUND_HALF_DOWN);
    }
}