Files
dusklight/include/dolphin/mtx/quat.h
T
TakaRikka 8b4808da8a almost all of dolphin matched (#2036)
* TRK full match

* remove trk asm

* ar done

* cleanup some dolphin headers

* more dolphin cleanup

* cleanup / GD fully matched

* almost all of GX fully matched

* GX / Mtx full matched

* most of OS done

* pad done

* most of VI

* remove asm

* forgot couple vec funcs

* couple JUtility matches
2024-01-20 02:22:19 +02:00

35 lines
711 B
C

#ifndef QUAT_H
#define QUAT_H
#include "dolphin/mtx/vec.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct Quaternion {
f32 x, y, z, w;
} Quaternion;
typedef f32 PSQuaternion[4];
void PSQUATMultiply(const Quaternion* a, const Quaternion* b, Quaternion* ab);
void C_QUATRotAxisRad(Quaternion* q, const Vec* axis, f32 rad);
void C_QUATSlerp(const Quaternion* p, const Quaternion* q, Quaternion* r, f32 t);
/* When compiling in debug mode, use C implementations */
#ifdef DEBUG
// TODO: Add debug rom C implementations
/* #define QUATMultiply C_QUATMultiply */
#define QUATMultiply PSQUATMultiply
#else
#define QUATMultiply PSQUATMultiply
#endif
#ifdef __cplusplus
};
#endif
#endif /* QUAT_H */