Easy way to truncate floats?
Easy way to truncate floats?
- Subject: Easy way to truncate floats?
- From: Sheehan Olver <email@hidden>
- Date: Tue, 14 Jan 2003 23:29:11 -0600
I'm writing a program that displays an equation, where some numbers are
stored as doubles. This means that, with a format of @"%f", I get
equations like "x^2.000000" instead of the desired result of "x^2". Is
there any way to trim off the trailing zeros?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.