Module astrup::utils [] [src]

Collection of various handy utilities

Structs

NonNan

Wrapper of f64 that implements Ord.

Traits

Drawable
Plottable

Functions

map_range

Map a number linearly from a reference system A to another reference system B.

order_of_magnitude

Find the order of magnitude of a number.

prettify

Format a tick label w.r.t. space and clarity

round_down

Return a number that is the input number rounded down to the nearest multiplum of nearest of order of magnitude omagn.

round_nearest

Return a number that is the input number rounded to the nearest multiplum of nearest of order of magnitude omagn.

round_up

Return a number that is the input number rounded up to the nearest multiplum of nearest of order of magnitude omagn.