X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Futil.hpp;fp=pv%2Futil.hpp;h=fab29a14f05ac21ea90b88d37088c2f9274a278f;hp=354013fe13e673ed3f82f4718505183c64b373b8;hb=0efa7f0cc59eab39dccce698d8fb6675feeb3e73;hpb=8845be3c9c7d5aca02fb2efc4038f4735a5242d6 diff --git a/pv/util.hpp b/pv/util.hpp index 354013fe..fab29a14 100644 --- a/pv/util.hpp +++ b/pv/util.hpp @@ -62,6 +62,11 @@ typedef boost::multiprecision::number< boost::multiprecision::cpp_dec_float<24>, boost::multiprecision::et_off> Timestamp; +/** + * Chooses a prefix so that the value in front of the decimal point is between 1 and 999. + */ +SIPrefix determine_value_prefix(double v); + /** * Formats a given timestamp with the specified SI prefix. *