| @@ 256-268 (lines=13) @@ | ||
| 253 | * @return Money |
|
| 254 | * @throws InvalidDataTypeException |
|
| 255 | */ |
|
| 256 | public function multiply($multiplier, $rounding_mode = Calculator::ROUND_HALF_UP) |
|
| 257 | { |
|
| 258 | return new Money( |
|
| 259 | $this->calculator()->multiply( |
|
| 260 | $this->amount(), |
|
| 261 | $multiplier, |
|
| 262 | $this->precision(), |
|
| 263 | $rounding_mode |
|
| 264 | ), |
|
| 265 | $this->currency(), |
|
| 266 | $this->calculator() |
|
| 267 | ); |
|
| 268 | } |
|
| 269 | ||
| 270 | ||
| 271 | /** |
|
| @@ 280-292 (lines=13) @@ | ||
| 277 | * @return Money |
|
| 278 | * @throws InvalidDataTypeException |
|
| 279 | */ |
|
| 280 | public function divide($divisor, $rounding_mode = Calculator::ROUND_HALF_UP) |
|
| 281 | { |
|
| 282 | return new Money( |
|
| 283 | $this->calculator()->divide( |
|
| 284 | $this->amount(), |
|
| 285 | $divisor, |
|
| 286 | $this->precision(), |
|
| 287 | $rounding_mode |
|
| 288 | ), |
|
| 289 | $this->currency(), |
|
| 290 | $this->calculator() |
|
| 291 | ); |
|
| 292 | } |
|
| 293 | ||
| 294 | ||
| 295 | ||