We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
u
μ
1 parent 7358e1e commit 31f4201Copy full SHA for 31f4201
1 file changed
src/qty.rs
@@ -27,7 +27,7 @@ pub struct Scale {
27
28
// should be sorted in DESC
29
#[rustfmt::skip]
30
-static SCALES: [Scale;13] = [
+static SCALES: [Scale;15] = [
31
Scale{ label:"Pi", base: 2, pow: 50},
32
Scale{ label:"Ti", base: 2, pow: 40},
33
Scale{ label:"Gi", base: 2, pow: 30},
@@ -40,6 +40,8 @@ static SCALES: [Scale;13] = [
40
Scale{ label:"k", base: 10, pow: 3},
41
Scale{ label:"", base: 10, pow: 0},
42
Scale{ label:"m", base: 10, pow: -3},
43
+ Scale{ label:"u", base: 10, pow: -6},
44
+ Scale{ label:"μ", base: 10, pow: -6},
45
Scale{ label:"n", base: 10, pow: -9},
46
];
47
@@ -316,6 +318,8 @@ mod tests {
316
318
("1m", "1.0m"),
317
319
("1000000n", "1000000.0n"),
320
// lowest precision is m, under 1m value is trunked
321
+ ("1u", "0.0u"),
322
+ ("1μ", "0.0μ"),
323
("1n", "0.0n"),
324
("999999n", "0.0n"),
325
0 commit comments