• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
mathematical functions?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mathematical functions?


  • Subject: mathematical functions?
  • From: Funkaster <email@hidden>
  • Date: Mon, 14 May 2001 22:25:02 -0400

How can I access mathematical functions from cocoa?
what I've done so far (dunno if it's good):
for (int i=0; i < total; i++) {
theta = [NSDecimal decimalNumberWithDecimal:(ang * 3,14159 / 180.0) * i/ total];
NSDecimalPower(r, theta, int power, NSRoundUp);
radio = [NSDecimal decimalNumberBySubstracting:[NSDecimal decimalNumberWithDecimal:1.0]];
}

what I want to do: (java)
for (int i=0; i < total; i++) {
double theta = (ang * Math.PI/180.0)*i/total;
double r = Math.pow(base,theta) - d;
double x = (int)r * Math.cos(theta);
double y = (int)r * Math.sin(theta);
}

how can I do this in Objective-C?
Thanks a lot,
fky


  • Follow-Ups:
    • Re: mathematical functions?
      • From: Greg Titus <email@hidden>
  • Prev by Date: Re: Fastest/smallest search+replace
  • Next by Date: Re: mathematical functions?
  • Previous by thread: Re: changing entire content view of an NSWindow
  • Next by thread: Re: mathematical functions?
  • Index(es):
    • Date
    • Thread