-
-
Notifications
You must be signed in to change notification settings - Fork 6
Helper Methods
The following helper methods are available on any class that implements NumberInterface
Returns the current value as a string. Note: This will return the current value in whatever the current base is.
Returns the precision setting of the object.
Returns the base of the current value.
Returns true
if the number is less than 0, false
otherwise. Note: Zero is not considered negative.
Returns true
if the number is greater than 0, false
otherwise. Note: Zero is not considered positive.
Returns true
if the object and value are equal to each other, false
otherwise. Note: Does not round or truncate based on precision prior to comparison.
Returns true
if the object is greater than the value argument, false
otherwise. Note: Does not round or truncate based on precision prior to comparison.
Returns true
if the object is greater than or equal to the value argument, false
otherwise. Note: Does not round or truncate based on precision prior to comparison.
Returns true
if the object is less than the value argument, false
otherwise. Note: Does not round or truncate based on precision prior to comparison.
Returns true
if the object is less than or equal to the value argument, false
otherwise. Note: Does not round or truncate based on precision prior to comparison.
Returns 1
if the object is greater than the value argument, 0
if they are equal, and -1
if the object is less than the value argument. Note: Does not round or truncate based on precision prior to comparison.
Applies the absolute value function to the current object. Note: For Mutable objects, this method will alter the object.
Returns the absolute value of the current object as a string without altering the object.
Changes the base of the current object and converts its value to that base.