1
mirror of https://github.com/DarkFlippers/unleashed-firmware.git synced 2025-12-12 20:49:49 +04:00

JS: Add math module (#3598)

* JS: Add math module
* Double constants
* Error on argument type mismatch
* Fix missing returns
* Using sin, exp from c library
* asin, acos, pow, sqrt too
* Js: tests for math module and various fixes.

Co-authored-by: あく <alleteam@gmail.com>
Co-authored-by: nminaylov <nm29719@gmail.com>
This commit is contained in:
WillyJL
2024-05-17 17:45:40 +01:00
committed by GitHub
parent 217bfac2fc
commit c673b53e21
5 changed files with 433 additions and 2 deletions

View File

@@ -280,7 +280,7 @@ static void mjs_append_stack_trace_line(struct mjs* mjs, size_t offset) {
const char* filename = mjs_get_bcode_filename_by_offset(mjs, offset);
int line_no = mjs_get_lineno_by_offset(mjs, offset);
char* new_line = NULL;
const char* fmt = "at %s:%d\n";
const char* fmt = "\tat %s:%d\r\n";
if(filename == NULL) {
// fprintf(
// stderr,