Atan2 and Hypot function speedup...

Dan Bernstein brnstnd at kramden.acf.nyu.edu
Mon Dec 24 00:41:38 AEST 1990


In article <1990Dec22.201442.21109 at nntp-server.caltech.edu> gceych at juliet.caltech.edu writes:
> i.e. tan (atan2 (a, b) + x)

What does this have to do with C?

If you asked this question in comp.graphics, you might be told to
precompute sin x and cos x, and then to compute a cos x + b sin x
divided by -a sin x + b cos x. Or to look up rotations in any
high-school trigonometry text. And to explain what you're really
trying to do next time you ask a general programming question.

---Dan



More information about the Comp.lang.c mailing list