I am looking to use sprintf to format some float values but I can't seem to get the formatting right.
I have tried "%1.6f" as a format string but this isn't what I want.
The "g" specifier with significant digits also doesn't seem to help with other situations where I need the padding.
"1.6f"
Actual output: 1.000000
Expected Output: 1
"g"
Actual output: 1.1
Expected Output: 1.100000
 
     
     
     
    