Add vec3() function for creating 3d vecs

This commit is contained in:
8dcc
2023-07-23 00:27:16 +02:00
parent 25a9a474cf
commit 9ec237509d
2 changed files with 11 additions and 0 deletions

View File

@@ -18,6 +18,16 @@ char* get_name(int ent_idx) {
return info.name;
}
vec3_t vec3(float x, float y, float z) {
vec3_t ret;
ret[0] = x;
ret[1] = y;
ret[2] = z;
return ret;
}
bool vec_is_zero(vec3_t v) {
return v[0] == 0.0f && v[1] == 0.0f && v[2] == 0.0f;
}