moontoast / math

A PHP 5.3+ mathematics library, providing functionality for large numbers
Apache License 2.0
247 stars 31 forks source link

[WIP] Add immutable number #2

Open rande opened 10 years ago

rande commented 10 years ago

The immutable object is usefull if you want to display a price without changing the object itself.

$product->getUnitPrice()->mul($quantity = 4) ...
rande commented 10 years ago

@ramsey Any comment on this PR ? I will add unit test on the class if you are agree on the change. By the way the changes are BC

ramsey commented 10 years ago

I had to take time to review the changes, and it looked like there were a lot of them, but that's just because of all the whitespace changes.

Everything looks good. Please add the unit test, and I'll merge in the changes.

Thanks for contributing this!

rande commented 10 years ago

Thanks for the feedback, I will do the unit test ASAP.

Thanks

stefanotorresi commented 7 years ago

@rande any update on this? I'd very much like this functionality. If you don't have the time let me know, I could pick this up.