1
mirror of https://github.com/DarkFlippers/unleashed-firmware.git synced 2025-12-13 13:09:49 +04:00
This commit is contained in:
MX
2024-10-15 03:16:21 +03:00
parent 45bc0e1ce6
commit edc58c5a0e
53 changed files with 3507 additions and 1451 deletions

View File

@@ -305,7 +305,8 @@ void js_math_trunc(struct mjs* mjs) {
mjs_return(mjs, mjs_mk_number(mjs, x < (double)0. ? ceil(x) : floor(x)));
}
static void* js_math_create(struct mjs* mjs, mjs_val_t* object) {
static void* js_math_create(struct mjs* mjs, mjs_val_t* object, JsModules* modules) {
UNUSED(modules);
mjs_val_t math_obj = mjs_mk_object(mjs);
mjs_set(mjs, math_obj, "is_equal", ~0, MJS_MK_FN(js_math_is_equal));
mjs_set(mjs, math_obj, "abs", ~0, MJS_MK_FN(js_math_abs));
@@ -342,6 +343,7 @@ static const JsModuleDescriptor js_math_desc = {
"math",
js_math_create,
NULL,
NULL,
};
static const FlipperAppPluginDescriptor plugin_descriptor = {