Re: Math question
Re: Math question
- Subject: Re: Math question
- From: "Todd Heberlein" <email@hidden>
- Date: Sun, 2 Sep 2001 14:58:43 -0700
- Organization: Net Squared, Inc.
>
but what about doing things like raising a number to a power?
Objective-C still inherits all the libraries from ANSI C, so the ANSI C
library functions are still available to you. These are defined in
math.h (pow(), log(), sin(), ...), described briefly in K&R's "The C
Programming Language" (everyone should have a copy), and should be
described by typing "man math" at the command line.
I think that part of the reason the original Cocoa number wrapper
classes were developed was to aid in serializing objects; for example,
to send across the wire to a system potentially running on different
hardware, or to encode into a database. But that is just a guess on my
part, and someone will probably correct this :-)
Todd