View Source Plox.NumberScale (Plox v0.2.1)
An arbitrary precision number scale
This struct implements the Plox.Scale protocol.
Although internally we use Decimal for arbitrary precision and accurate
math, this scale expects floats as input and produces floats as output, so
there's still some room for floating point imprecision.
Summary
Functions
Creates a new Plox.NumberScale struct
Types
Functions
Creates a new Plox.NumberScale struct
Accepts 2 numbers as first and last as well as the number of ticks that
should comprise the scale. The in-between values for these ticks are
dynamically calculated based on first, last, and ticks.
ticks must be at least 2.