Module yapb::prefix

source ·
Expand description

Helpers to display compact human-readable numbers

Structs

Helper struct to compactly format a value with a binary unit prefix
Helper struct to compactly format a value with a SI unit prefix
Helper struct to format a float with format_sigfigs

Functions

Given an exact value x, return the same value scaled to the nearest lesser binary prefix, and the prefix in question.
Format value compactly with exactly figures significant figures
Given an exact value x, return the same value scaled to the nearest lesser SI prefix, and the prefix in question.