summaryrefslogtreecommitdiff
path: root/tikzit/src/common/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'tikzit/src/common/util.h')
-rw-r--r--tikzit/src/common/util.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/tikzit/src/common/util.h b/tikzit/src/common/util.h
index f527820..b34f25d 100644
--- a/tikzit/src/common/util.h
+++ b/tikzit/src/common/util.h
@@ -191,4 +191,11 @@ NSString *alphaHex(unsigned short sh);
const char *find_start_of_nth_line (const char * string, int line);
-// vi:ft=objc:noet:ts=4:sts=4:sw=4
+/*!
+ @brief Formats a CGFloat as a string, removing trailing zeros
+ @detail Unlike formatting an NSNumber, or using %g, it will never
+ produce scientific notation (like "2.00e2"). Unlike %f,
+ it will not include unnecessary trailing zeros.
+ */
+NSString *formatFloat(CGFloat f, int maxdps);
+