Skip to Content
GPGPU Programming for Games and Science
book

GPGPU Programming for Games and Science

by David H. Eberly
August 2014
Intermediate to advanced
469 pages
16h 30m
English
A K Peters/CRC Press
Content preview from GPGPU Programming for Games and Science
Linear and Affine Algebra 317
e.angle [0] = 0;
e.angle [1] = sign pi /2;
e.angle [2] = atan2( sign r(e. axis [1] ,e. axis [0]) ,
r(e. axis [1] ,e. axis [1]));
e. result = NOT
UNIQUE SUM ;
}
}
else
{
// Map (0,2,0), (1,0,1), and (2,1,2) to 1. Map (0,1,0), (1,2,1),
// and (2,0,2) to +1.
int b2 = 3 e.axis[0] e. axis [1];
int parity = (((b2 | (e. axis [1] << 2)) >> e. axis [0]) & 1);
Real const sign = ( parity & 1 ? 1 : +1);
if (r(e. axis [0] ,e. axis [0]) < 1)
{
if (r(e.axis[0],e.axis[0]) > 1)
{
e.angle [0] = atan2(r(e. axis [1] ,e. axis [0]) ,
sign r(b2,e. axis [0]));
e.angle[1] = acos(r(e.axis[0],e.axis [0]));
e.angle [2] = atan2(r(e. axis [0] ,e. axis [1]) ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Graphics Gems V (IBM Version)

Graphics Gems V (IBM Version)

Alan W. Paeth
GPU Pro 6

GPU Pro 6

Wolfgang Engel

Publisher Resources

ISBN: 9781466595354