qdtk / openshadinglanguage

Automatically exported from code.google.com/p/openshadinglanguage
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

add sincos function #52

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Shaders frequently need to compute sin and cos of the same angle. A
built-in with the following signature would be quite useful:

void sincos(output <type> sine, output <type> cosine, <type> angle);

Original issue reported on code.google.com by cku...@gmail.com on 4 Feb 2010 at 9:56

GoogleCodeExporter commented 9 years ago
Please put the angle as the first argument.  That's the usual convention, and 
also
matches the sincos that comes with some C compilers:

'man sincos' on Linux yields:

void sincos(double x, double *sin, double *cos);
(etc., and float, long double versions as well)

Original comment by larrygr...@gmail.com on 4 Feb 2010 at 10:03

GoogleCodeExporter commented 9 years ago

Original comment by larrygr...@gmail.com on 4 Feb 2010 at 10:04

GoogleCodeExporter commented 9 years ago
http://codereview.appspot.com/205045/show

Original comment by cku...@gmail.com on 8 Feb 2010 at 11:05

GoogleCodeExporter commented 9 years ago
Done in r576.

Original comment by cku...@gmail.com on 9 Feb 2010 at 1:41