changeset 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 6ce8ed5ba76d
children 4b4ae555067b
files misc.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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: