This PR adds functions like isGreaterOrEqualTo($b, $scale). Reason for these methods is readability.
I believe, that $a->isGreaterThan($b) is much easier to understand than $a->comp($b) === 1.
Let me know, what you think. I noticed that there currently is equals() method, so I'd be OK with renaming these functions to $a->greaterThan($b) (or maybe also adding isEqualTo()) for consistency.
Note: Wiki would also need to be updated.
Thanks for a great library & consideration of this contribution!
This PR adds functions like
isGreaterOrEqualTo($b, $scale)
. Reason for these methods is readability.I believe, that
$a->isGreaterThan($b)
is much easier to understand than$a->comp($b) === 1
.Let me know, what you think. I noticed that there currently is
equals()
method, so I'd be OK with renaming these functions to$a->greaterThan($b)
(or maybe also addingisEqualTo()
) for consistency.Note: Wiki would also need to be updated.
Thanks for a great library & consideration of this contribution!