Added cwasm_vectors.c and cwasm_matrices.c. Vectors API is completely finished, Matrices API is partially finished. Added Clamp(value, min, max) macro to cwasm.h. Fixed types on jsGl functions that take vectors or matrices (and Arena*).

This commit is contained in:
2025-09-02 00:15:03 -07:00
parent b62f0d279b
commit 1a9775d670
7 changed files with 1072 additions and 45 deletions

View File

@@ -131,6 +131,8 @@ Description:
#endif
#define NotNull(expression) Assert((expression) != nullptr)
#define Clamp(value, min, max) (((value) < (min)) ? (min) : (((value) > (max)) ? (max) : (value)))
//Actual Value of Pi: 3.1415926535897932384626433832795...
#define Pi64 3.14159265358979311599796346854 //accurate to 15 digits
#define Pi32 3.1415927410125732421875f //accurate to 6 digits