mirror of
https://github.com/guezoloic/t3dsr.git
synced 2026-01-25 10:34:23 +00:00
feat(vector): Initialize module and add constructor
This commit is contained in:
14
src/math/vector3.c
Normal file
14
src/math/vector3.c
Normal file
@@ -0,0 +1,14 @@
|
||||
#include <math/vector3.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
Vec3* vec3(float x, float y, float z)
|
||||
{
|
||||
Vec3* vec = (Vec3*)malloc(sizeof(Vec3));
|
||||
if (!vec) return NULL;
|
||||
|
||||
vec->x = x;
|
||||
vec->y = y;
|
||||
vec->z = z;
|
||||
|
||||
return vec;
|
||||
}
|
||||
Reference in New Issue
Block a user