KitchenSink v0.0.25 KitchenSink.Math

Math functions!

Summary

Functions

Always round up to the nearest multiple of significance

handles divide by zero gracefully

Functions

ceil(number, significance)

Always round up to the nearest multiple of significance

Example:

iex> ceil(31, 5) 35

iex> ceil(29.49, 10) 30

div(numerator, denominator, div_by_zero)

handles divide by zero gracefully.

third argument is what to return when you divide by zero.