print vectors

This commit is contained in:
Daniel Ledda
2025-02-16 23:42:49 +01:00
parent f12b4091d7
commit ea2ddf60f3
2 changed files with 45 additions and 0 deletions

9
core.h
View File

@@ -110,6 +110,12 @@ inline function Vector3<T> vec3(T x, T y, T z) {
template <typename T>
union Vector4 {
struct {
T r;
T g;
T b;
T a;
};
struct {
T x;
T y;
@@ -255,6 +261,9 @@ enum StdStream {
void print(list<int> l, StdStream target = StdStream_stdout);
void print(list<string> l, StdStream target = StdStream_stdout);
void print(list<Vector2<real32>> l, StdStream target = StdStream_stdout);
void print(list<Vector3<real32>> l, StdStream target = StdStream_stdout);
void print(list<Vector4<real32>> l, StdStream target = StdStream_stdout);
void print(const char *fmt, ...);
void printErr(const char *fmt, ...);