Vtc.Utils.Rational (vtc v0.2.4) View Source
Helper functions and types for working with the Ratio module.
Link to this section Summary
Types
The Ratio module will often convert itself to an integer value if the result would be a whole number, but otherwise return a %Ratio{} struct.
Functions
Does the divmod operation on a rational vale, returns a {whole_dividend, rational_rainder} tuple.
Rounds a Ratio to the nearest integer.
Link to this section Types
Specs
The Ratio module will often convert itself to an integer value if the result would be a whole number, but otherwise return a %Ratio{} struct.
This type can be used when working with such a value.
Link to this section Functions
Specs
Does the divmod operation on a rational vale, returns a {whole_dividend, rational_rainder} tuple.
Specs
Rounds a Ratio to the nearest integer.