mirror of
https://github.com/zeldaret/tp
synced 2026-05-23 15:01:53 -04:00
1114b13da8
* d_a_alldie / d_a_tboxSw / d_a_tag_gstart / d_a_tag_hstop * dolphin OS work / cleanup * dolphin GX work / cleanup * finish changing dolphin files to C * more files into C * match rest of MSL_C math functions * more dolphin files converted to C * remove asm * d_bg_w work * remove asm * d_a_alink work / kytag14
41 lines
919 B
C
41 lines
919 B
C
#ifndef VEC_H
|
|
#define VEC_H
|
|
|
|
#include "dolphin/types.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef struct Vec {
|
|
f32 x, y, z;
|
|
} Vec;
|
|
|
|
typedef Vec* VecPtr;
|
|
typedef Vec Point3d;
|
|
typedef Vec* Point3dPtr;
|
|
|
|
typedef struct SVec {
|
|
s16 x, y, z;
|
|
} SVec;
|
|
|
|
void PSVECAdd(const Vec* a, const Vec* b, Vec* ab);
|
|
void PSVECSubtract(const Vec* a, const Vec* b, Vec* a_b);
|
|
void PSVECScale(const Vec* src, Vec* dst, f32 scale);
|
|
void PSVECNormalize(const Vec* src, Vec* unit);
|
|
f32 PSVECSquareMag(const Vec* v);
|
|
f32 PSVECMag(const Vec* v);
|
|
f32 PSVECDotProduct(const Vec* a, const Vec* b);
|
|
void PSVECCrossProduct(const Vec* a, const Vec* b, Vec* axb);
|
|
f32 PSVECSquareDistance(const Vec* a, const Vec* b);
|
|
f32 PSVECDistance(const Vec* a, const Vec* b);
|
|
|
|
void C_VECHalfAngle(const Vec* a, const Vec* b, Vec* half);
|
|
void C_VECReflect(const Vec* src, const Vec* normal, Vec* dst);
|
|
|
|
#ifdef __cplusplus
|
|
};
|
|
#endif
|
|
|
|
#endif /* VEC_H */
|