mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
30 lines
598 B
PHP
30 lines
598 B
PHP
<?php
|
|
/**
|
|
* Invoice Ninja (https://invoiceninja.com)
|
|
*
|
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
*
|
|
* @copyright Copyright (c) 2019. Invoice Ninja LLC (https://invoiceninja.com)
|
|
*
|
|
* @license https://opensource.org/licenses/AAL
|
|
*/
|
|
|
|
namespace App\Utils;
|
|
|
|
/**
|
|
* Class NumberHelper.
|
|
*/
|
|
class NumberHelper
|
|
{
|
|
/**
|
|
* @param float $value
|
|
* @param int $precision
|
|
*
|
|
* @return float
|
|
*/
|
|
public static function roundValue(float $value, int $precision = 2) : float
|
|
{
|
|
return round($value, $precision, PHP_ROUND_HALF_UP);
|
|
}
|
|
}
|