<?php

declare(strict_types=1);

namespace  FiloBlu\Refilo\Model;

/**
 * Rounds num away from zero when it is half way there, making 1.5 into 2 and -1.5 into -2.
 */
class RoundHalfUpStrategy implements RoundingStrategyInterface {

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