@@ 292-305 (lines=14) @@ | ||
289 | * @return Money |
|
290 | * @throws InvalidDataTypeException |
|
291 | */ |
|
292 | public function multiply($multiplier, $rounding_mode = Calculator::ROUND_HALF_UP) |
|
293 | { |
|
294 | return new Money( |
|
295 | $this->calculator()->multiply( |
|
296 | $this->amount(), |
|
297 | $multiplier, |
|
298 | $this->precision(), |
|
299 | $rounding_mode |
|
300 | ), |
|
301 | $this->currency(), |
|
302 | $this->calculator(), |
|
303 | $this->formatters() |
|
304 | ); |
|
305 | } |
|
306 | ||
307 | ||
308 | ||
@@ 318-331 (lines=14) @@ | ||
315 | * @return Money |
|
316 | * @throws InvalidDataTypeException |
|
317 | */ |
|
318 | public function divide($divisor, $rounding_mode = Calculator::ROUND_HALF_UP) |
|
319 | { |
|
320 | return new Money( |
|
321 | $this->calculator()->divide( |
|
322 | $this->amount(), |
|
323 | $divisor, |
|
324 | $this->precision(), |
|
325 | $rounding_mode |
|
326 | ), |
|
327 | $this->currency(), |
|
328 | $this->calculator(), |
|
329 | $this->formatters() |
|
330 | ); |
|
331 | } |
|
332 | ||
333 | ||
334 |