Is there a format specifier to format a double to only include up to a max number of non-zero significant digits after the decimal place?
For example, if I want a max of 4 significant digits and the number is:
3.14159265359, I want to display 3.1459
5.7350, I want 5.735
2.680, I want 2.68
9.200, I want 9.2
7.000, I want 7 (no decimal point)