diff misc.py @ 83:4cc3d0706dd1

Add suffixes down to atto
author Daniel O'Connor <doconnor@gsoft.com.au>
date Thu, 03 Oct 2024 08:56:07 +0930
parents 47da95b31dcb
children
line wrap: on
line diff
--- a/misc.py	Fri Sep 27 17:50:10 2024 +0930
+++ b/misc.py	Thu Oct 03 08:56:07 2024 +0930
@@ -27,7 +27,7 @@
 
 def sifmt(_v, dp = 3, unit = 'Hz', sp = ' '):
     '''Format a number using SI prefixes'''
-    si_prefixes = ('T', 'G', 'M', 'k', '', 'm', 'µ', 'n', 'p')
+    si_prefixes = ('T', 'G', 'M', 'k', '', 'm', 'µ', 'n', 'p', 'f', 'a')
     scale = 10 ** 12
     v = abs(_v)
     if v == 0: