Rounding to two decimals
Rounding to two decimals
- Subject: Rounding to two decimals
- From: Ken Garden <email@hidden>
- Date: Sat, 17 Jul 2004 23:14:25 +0200
Hi everyone,
I just joined the list and wanted to ask a simple beginner's question
to finish up my very first project in Cocoa. It's a simple app that
calculates the average of integers. This result (float type) often is
a decimal number with several digits. How can this float be limited
and rounded to two decimals?
I've tried the codes provided in the following page already, but
without success:
http://www.cocoadev.com/index.pl?RoundingFloatingPointValues
Thanks in advance!
_______________________________________________
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.