1 | <?php |
||
31 | class RoundTo |
||
32 | { |
||
33 | /** |
||
34 | * Round to nearest increment |
||
35 | * |
||
36 | * @param float $increment incremenet to round to |
||
37 | * @param float $value value to round |
||
38 | * |
||
39 | * @return float |
||
40 | * |
||
41 | * @access public |
||
42 | */ |
||
43 | 1 | public function nearest($increment, $value) |
|
49 | |||
50 | /** |
||
51 | * Round to next increment |
||
52 | * |
||
53 | * @param float $increment incremenet to round to |
||
54 | * @param float $value value to round |
||
55 | * |
||
56 | * @return float |
||
57 | * |
||
58 | * @access public |
||
59 | */ |
||
60 | 1 | public function next($increment, $value) |
|
66 | |||
67 | /** |
||
68 | * Round to previous increment |
||
69 | * |
||
70 | * @param float $increment incremenet to round to |
||
71 | * @param float $value value to round |
||
72 | * |
||
73 | * @return float |
||
74 | * |
||
75 | * @access public |
||
76 | */ |
||
77 | 1 | public function previous($increment, $value) |
|
83 | } |
||
84 |