Merge branch 'package'
[speedfreak] / Server / system / helpers / num.php
1 <?php defined('SYSPATH') OR die('No direct access allowed.');
2 /**
3  * Number helper class.
4  *
5  * $Id: num.php 3769 2008-12-15 00:48:56Z zombor $
6  *
7  * @package    Core
8  * @author     Kohana Team
9  * @copyright  (c) 2007-2008 Kohana Team
10  * @license    http://kohanaphp.com/license.html
11  */
12 class num_Core {
13
14         /**
15          * Round a number to the nearest nth
16          *
17          * @param   integer  number to round
18          * @param   integer  number to round to
19          * @return  integer
20          */
21         public static function round($number, $nearest = 5)
22         {
23                 return round($number / $nearest) * $nearest;
24         }
25
26 } // End num