1 | <?php |
||
11 | class MathFuncs |
||
12 | { |
||
13 | /** |
||
14 | * @param $leftOperand |
||
15 | * @param $rightOperand |
||
16 | * @return string |
||
17 | */ |
||
18 | public static function add($leftOperand, $rightOperand) |
||
22 | |||
23 | /** |
||
24 | * @param $leftOperand |
||
25 | * @param $rightOperand |
||
26 | * @return string |
||
27 | */ |
||
28 | public static function sub($leftOperand, $rightOperand) |
||
32 | |||
33 | /** |
||
34 | * @param $leftOperand |
||
35 | * @param $rightOperand |
||
36 | * @return string |
||
37 | */ |
||
38 | public static function mul($leftOperand, $rightOperand) |
||
42 | |||
43 | /** |
||
44 | * @param $leftOperand |
||
45 | * @param $rightOperand |
||
46 | * @return string |
||
47 | */ |
||
48 | public static function div($leftOperand, $rightOperand) |
||
52 | |||
53 | /** |
||
54 | * @param $leftOperand |
||
55 | * @param $rightOperand |
||
56 | * @return string |
||
57 | */ |
||
58 | public static function pow($leftOperand, $rightOperand) |
||
62 | |||
63 | /** |
||
64 | * @param $leftOperand |
||
65 | * @param $rightOperand |
||
66 | * @return int |
||
67 | */ |
||
68 | public static function comp($leftOperand, $rightOperand) |
||
72 | |||
73 | /** |
||
74 | * @param $roundedNumber |
||
75 | * @param $precision |
||
76 | * @return string |
||
77 | */ |
||
78 | public static function round($roundedNumber, $precision = 2) |
||
82 | |||
83 | /** |
||
84 | * @param $roundedNumber |
||
85 | * @param $precision |
||
86 | * @return string |
||
87 | */ |
||
88 | public static function roundUp($roundedNumber, $precision = 2) |
||
92 | |||
93 | /** |
||
94 | * @param $roundedNumber |
||
95 | * @param $precision |
||
96 | * @return string |
||
97 | */ |
||
98 | public static function roundDown($roundedNumber, $precision = 2) |
||
102 | } |
||
103 | } |
||
104 |