meas: correctly render SI prefixes for negative numbers
the previous implementation treated negative numbers as effectively having unknown magnitude, rendering them without any adjustment.
This commit is contained in:
@@ -118,7 +118,7 @@ enum SiScale {
|
||||
impl SiScale {
|
||||
fn for_value(v: f32) -> Self {
|
||||
use SiScale::*;
|
||||
match v {
|
||||
match v.abs() {
|
||||
v if v < 1e-12 => Unit,
|
||||
v if v < 1e-9 => Pico,
|
||||
v if v < 1e-6 => Nano,
|
||||
|
Reference in New Issue
Block a user