Re : arithmetic in Cocoa
Re : arithmetic in Cocoa
- Subject: Re : arithmetic in Cocoa
- From: jean Bousquet <email@hidden>
- Date: Fri, 04 Jul 2003 19:51:16 +0200
You don't need.
Assuming that N is got from user through a textField, you get directly a C
variable with :
N=[textField doubleValue]
aso for all the other variables you need
then you may keep your C formula unchanged because you deal with normal C
variables.
You use objective C for UI but could keep classic C for calculations.
Jean Bousquet
>
Date: Fri, 4 Jul 2003 16:24:46 +0200
>
Subject: arithmetic in Cocoa
>
From: Cyprien <email@hidden>
>
To: email@hidden
>
>
How do you translate a Formula like this one in Objective-C?
>
>
k = 2*round(N/Fs*Fin/2) + 1
>
>
Do I really have to use method such as NSDecimalRound() and so on to
>
calculate this?
>
>
Cyprien
_______________________________________________
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.