Merge branch 'maint/7.0'
[ninja.git] / system / helpers / num.php
blob1197c1451f7b559dfaa43033ca6137124ba30170
1 <?php defined('SYSPATH') OR die('No direct access allowed.');
2 /**
3 * Number helper class.
5 * $Id: num.php 3917 2009-01-21 03:06:22Z zombor $
7 * @package Core
8 * @author Kohana Team
9 * @copyright (c) 2007-2008 Kohana Team
10 * @license http://kohanaphp.com/license.html
12 class num {
14 /**
15 * Round a number to the nearest nth
17 * @param integer number to round
18 * @param integer number to round to
19 * @return integer
21 public static function round($number, $nearest = 5)
23 return round($number / $nearest) * $nearest;
26 } // End num