Re: Modulus calculation
Re: Modulus calculation
- Subject: Re: Modulus calculation
- From: Nick Zitzmann <email@hidden>
- Date: Sun, 1 Jun 2008 19:27:20 -0600
On Jun 1, 2008, at 7:19 PM, vince wrote:
I need to state whether a modulus value = zero.
For example:
if (textField.floatValue % 10 == (0)) {
What's wrong with my syntax?
You can't use % with floating point values. Instead, use fmod() on
doubles (CGFloat on 64-bit) and fmodf() on singles (CGFloat on 32-
bit). See the man page for details.
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden