polyadvent

A game engine from scratch in C
git clone git://jb55.com/polyadvent
Log | Files | Refs | README

quat.h (519B)


      1 
      2 
      3 #ifndef POLYADVENT_QUAT4_
      4 #define POLYADVENT_QUAT4_
      5 
      6 typedef float quat;
      7 #define QUAT(x,y,z,w) ((quat[4]){x,y,z,w})
      8 
      9 void quat_id(quat *dest);
     10 void quat_multiply(quat *a, quat *b, quat *dest);
     11 void quat_axis_angle(float *axis, float angle, quat *dest);
     12 void quat_from_axes(float yaw, float pitch, float roll);
     13 void quat_to_mat3(quat *quat, float *dest);
     14 float quat_yaw(quat *quat);
     15 void quat_multiply_vec3(quat *quat, float *vec, float *dest);
     16 quat *quat_inverse(quat *q, quat *dest);
     17 
     18 #endif /* POLYADVENT_QUAT4_ */