summaryrefslogtreecommitdiff
path: root/include/rvl/MTX/vec.h
blob: 70e0c58b4149f42df4fded09d19a3456e87aae20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef RVL_SDK_MTX_VEC_H
#define RVL_SDK_MTX_VEC_H
#include "common.h"
#include "rvl/MTX/mtx.h"

#ifdef __cplusplus
extern "C" {
#endif

void PSVECAdd(const Vec *, const Vec *, Vec *);
void PSVECSubtract(const Vec *, const Vec *, Vec *);
void PSVECScale(const Vec *, Vec *, f32);
void PSVECNormalize(const Vec *, Vec *);
f32 PSVECMag(const Vec *);
f32 PSVECDotProduct(const Vec *, const Vec *);
void PSVECCrossProduct(const Vec *, const Vec *, Vec *);
f32 PSVECSquareDistance(const Vec *, const Vec *);
f32 PSVECDistance(const Vec *, const Vec *);

#define VECAdd            PSVECAdd
#define VECSubtract       PSVECSubtract
#define VECScale          PSVECScale
#define VECNormalize      PSVECNormalize
#define VECSquareMag      PSVECSquareMag
#define VECMag            PSVECMag
#define VECDotProduct     PSVECDotProduct
#define VECCrossProduct   PSVECCrossProduct
#define VECSquareDistance PSVECSquareDistance
#define VECDistance       PSVECDistance

void C_VECHalfAngle(const Vec *, const Vec *, Vec *);
void C_VECReflect(const Vec *, const Vec *, Vec *);

#define VECHalfAngle      C_VECHalfAngle
#define VECReflect        C_VECReflect

#ifdef __cplusplus
}
#endif
#endif