add angle funcs

This commit is contained in:
2025-12-01 08:46:45 -06:00
parent 91d7d6f1df
commit 91626b8efd
3 changed files with 8 additions and 3 deletions

View File

@@ -241,3 +241,11 @@ float *rgba2floats(float *r, struct rgba c)
r[3] = (float)c.a / RGBA_MAX;
return r;
}
JSValue angle2js(JSContext *js, double angle) {
return number2js(js, angle);
}
double js2angle(JSContext *js, JSValue v) {
return js2number(js, v);
}

View File

@@ -36,7 +36,6 @@ JSValue vec32js(JSContext *js, HMM_Vec3 v);
JSValue vec42js(JSContext *js, HMM_Vec4 v);
JSValue quat2js(JSContext *js, HMM_Quat q);
JSValue color2js(JSContext *js, colorf c);
JSValue number2js(JSContext *js, double d);
JSValue angle2js(JSContext *js, double a);
rect js2rect(JSContext *js, JSValue v);
@@ -45,7 +44,6 @@ HMM_Vec3 js2vec3(JSContext *js, JSValue v);
HMM_Vec4 js2vec4(JSContext *js, JSValue v);
HMM_Quat js2quat(JSContext *js, JSValue v);
colorf js2color(JSContext *js, JSValue v);
double js2number(JSContext *js, JSValue v);
double js2angle(JSContext *js, JSValue v);
#define RGBA_MAX 255

View File

@@ -2,7 +2,6 @@
#include "stb_ds.h"
#include "qjs_actor.h"
#include "wota.h"
#include "qjs_wota.h"
#include <SDL3/SDL.h>