Rounding Function #10
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This one is pretty self explanatory - the ability to round doubles would be extremely useful for computation.
round $double &int
: Rounds a double to the nearest integer.floor $double &int
: Rounds a double down to the nearest integer.ceiling $double &int
: Rounds a double up to the nearest integer.mod $double $double &double
: Finds the first input modulo the second input. Easiest way to understand this is a clock: a clock works modulo 12.\text{mod}(15,12)=3
,\text{mod}(23,12)=11
,\text{mod}(-2,12)=10
.Added in the latest math library. If you could try it out and make sure it works that would be good