Jump to content

User:Retep998

From Wikipedia, the free encyclopedia

This is the current revision of this page, as edited by Retep998 (talk | contribs) at 19:57, 13 April 2011. The present address (URL) is a permanent link to this version.

(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

mul(Quat4d q1,Quat4d q2) {

   x =  q1.x * q2.w + q1.y * q2.z - q1.z * q2.y + q1.w * q2.x;
   y = -q1.x * q2.z + q1.y * q2.w + q1.z * q2.x + q1.w * q2.y;
   z =  q1.x * q2.y - q1.y * q2.x + q1.z * q2.w + q1.w * q2.z;
   w = -q1.x * q2.x - q1.y * q2.y - q1.z * q2.z + q1.w * q2.w;

}

(define (quat* q1 q2)

       (