public static function percentage($total, $actual, $round = 1)
    {
        // Avoid useless calculations
        if ($total == 0 || $actual == 0) {
            return 0;
        }

        $value = 100 * $actual / $total;

        if (is_integer($round)) {
            $value = round($value, $round);
        }

        return $value;
    }