mirror of
https://github.com/guezoloic/t3dsr.git
synced 2026-01-25 13:34:24 +00:00
feat(vector4): Initialize and add all basic functions
This commit is contained in:
26
include/math/vector4.h
Normal file
26
include/math/vector4.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#ifndef VECTOR4_H
|
||||
#define VECTOR4_H
|
||||
|
||||
typedef struct {
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
float w;
|
||||
} Vec4;
|
||||
|
||||
Vec4* vec4(float x, float y, float z, float w);
|
||||
Vec4* vec4Add(Vec4* v1, Vec4* v2);
|
||||
Vec4* vec4Sub(Vec4* v1, Vec4* v2);
|
||||
Vec4* vec4Scale(Vec4* v, float scalar);
|
||||
float vec4Dot(Vec4* a, Vec4* b);
|
||||
float vec4Len(Vec4* v);
|
||||
Vec4* vec4Norm(Vec4* v);
|
||||
Vec4* vec4Lerp(Vec4* a, Vec4* b, float t);
|
||||
float vec4Angle(Vec4* a, Vec4* b);
|
||||
Vec4* vec4Proj(Vec4* a, Vec4* b);
|
||||
Vec4* vec4Refl(Vec4* v, Vec4* normal);
|
||||
float vec4Dist(Vec4* a, Vec4* b);
|
||||
void vec4Free(Vec4* v);
|
||||
|
||||
|
||||
#endif // VECTOR4_H
|
||||
Reference in New Issue
Block a user