Re: What's up with sinf()?
Re: What's up with sinf()?
- Subject: Re: What's up with sinf()?
- From: email@hidden
- Date: Wed, 21 Nov 2001 21:34:27 +0100
Le mardi 20 novembre 2001, ` 08:35 , email@hidden a
icrit :
Something a bit wierd: I'm getting link errors when I try to use sinf()
instead of sin(). They're both defined in <math.h>, and presumably in
the same library, aren't they? I'd just as soon use sinf(), since what
I'm doing doesn't require double precision.
Are you using (Obj-)C or (Obj-)C++ ? There is no sinf() in C++, because
sin() is overloaded to handle double and float (and complex,...).
What I'm doing BTW, is drawing gradients based on sinusoidal and
conic-section curves scaled to a 256x256 square. If someone could point
me to code for a fixed-point sin function, I'd just as soon use that.
I'd rather not embed a sine table in the code, though ;-)
You probably need the sin only for a few hundreds of value, then? It might
be interesting to just pre-compute the values at startup, and then use the
computed values many time.
Thomas Lachand-Robert
********************** email@hidden
<< Et le chemin est long du projet ` la chose. >> Molihre, Tartuffe.