redscript-mc 2.5.0 → 2.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +80 -0
- package/README.md +5 -75
- package/README.zh.md +165 -147
- package/ROADMAP.md +195 -0
- package/dist/data/linalg/function/_vec2d_len_sq_fx.mcfunction +17 -0
- package/dist/data/linalg/function/_vec3d_len_sq_fx.mcfunction +27 -0
- package/dist/data/linalg/function/load.mcfunction +1 -0
- package/dist/data/linalg/function/mat2d_det.mcfunction +16 -0
- package/dist/data/linalg/function/mat2d_mul_r0c0.mcfunction +16 -0
- package/dist/data/linalg/function/mat2d_mul_r0c1.mcfunction +16 -0
- package/dist/data/linalg/function/mat2d_mul_r1c0.mcfunction +16 -0
- package/dist/data/linalg/function/mat2d_mul_r1c1.mcfunction +16 -0
- package/dist/data/linalg/function/mat2d_vecmul_x.mcfunction +16 -0
- package/dist/data/linalg/function/mat2d_vecmul_y.mcfunction +16 -0
- package/dist/data/linalg/function/solve2d_x.mcfunction +27 -0
- package/dist/data/linalg/function/solve2d_y.mcfunction +27 -0
- package/dist/data/linalg/function/vec2d_dist.mcfunction +15 -0
- package/dist/data/linalg/function/vec2d_dot.mcfunction +16 -0
- package/dist/data/linalg/function/vec2d_length.mcfunction +21 -0
- package/dist/data/linalg/function/vec2d_normalize_x.mcfunction +8 -0
- package/dist/data/linalg/function/vec2d_normalize_x__merge_1.mcfunction +10 -0
- package/dist/data/linalg/function/vec2d_normalize_x__then_0.mcfunction +3 -0
- package/dist/data/linalg/function/vec2d_normalize_y.mcfunction +8 -0
- package/dist/data/linalg/function/vec2d_normalize_y__merge_1.mcfunction +10 -0
- package/dist/data/linalg/function/vec2d_normalize_y__then_0.mcfunction +3 -0
- package/dist/data/linalg/function/vec3d_cross_x.mcfunction +16 -0
- package/dist/data/linalg/function/vec3d_cross_y.mcfunction +16 -0
- package/dist/data/linalg/function/vec3d_cross_z.mcfunction +16 -0
- package/dist/data/linalg/function/vec3d_dist.mcfunction +21 -0
- package/dist/data/linalg/function/vec3d_dot.mcfunction +26 -0
- package/dist/data/linalg/function/vec3d_length.mcfunction +31 -0
- package/dist/data/linalg/function/vec3d_normalize_x.mcfunction +9 -0
- package/dist/data/linalg/function/vec3d_normalize_x__merge_1.mcfunction +11 -0
- package/dist/data/linalg/function/vec3d_normalize_x__then_0.mcfunction +3 -0
- package/dist/data/linalg/function/vec3d_normalize_y.mcfunction +9 -0
- package/dist/data/linalg/function/vec3d_normalize_y__merge_1.mcfunction +11 -0
- package/dist/data/linalg/function/vec3d_normalize_y__then_0.mcfunction +3 -0
- package/dist/data/linalg/function/vec3d_normalize_z.mcfunction +9 -0
- package/dist/data/linalg/function/vec3d_normalize_z__merge_1.mcfunction +11 -0
- package/dist/data/linalg/function/vec3d_normalize_z__then_0.mcfunction +3 -0
- package/dist/data/math_hp/function/cos_hp.mcfunction +8 -0
- package/dist/data/math_hp/function/div3_hp.mcfunction +23 -0
- package/dist/data/math_hp/function/div_hp.mcfunction +13 -0
- package/dist/data/math_hp/function/init_div.mcfunction +1 -0
- package/dist/data/math_hp/function/init_trig.mcfunction +1 -0
- package/dist/data/math_hp/function/ln_5term.mcfunction +6 -0
- package/dist/data/math_hp/function/ln_5term__loop_body_1.mcfunction +8 -0
- package/dist/data/math_hp/function/ln_5term__loop_body_4.mcfunction +8 -0
- package/dist/data/math_hp/function/ln_5term__loop_exit_2.mcfunction +1 -0
- package/dist/data/math_hp/function/ln_5term__loop_exit_5.mcfunction +61 -0
- package/dist/data/math_hp/function/ln_5term__loop_header_0.mcfunction +3 -0
- package/dist/data/math_hp/function/ln_5term__loop_header_3.mcfunction +6 -0
- package/dist/data/math_hp/function/load.mcfunction +1 -0
- package/dist/data/math_hp/function/norm3_hp.mcfunction +43 -0
- package/dist/data/math_hp/function/sin_hp.mcfunction +8 -0
- package/dist/data/math_hp/function/sqrt_hp.mcfunction +17 -0
- package/dist/data/math_hp/function/sqrt_hp__merge_1.mcfunction +21 -0
- package/dist/data/math_hp/function/sqrt_hp__then_0.mcfunction +2 -0
- package/dist/data/minecraft/tags/function/load.json +1 -2
- package/dist/data/minecraft/tags/function/tick.json +1 -1
- package/dist/data/readme_demo/function/_draw.mcfunction +1 -0
- package/dist/data/readme_demo/function/_init.mcfunction +1 -0
- package/dist/data/readme_demo/function/_math_init.mcfunction +4 -0
- package/dist/data/readme_demo/function/_wave_tick.mcfunction +1 -0
- package/dist/data/readme_demo/function/_wave_tick__foreach_t8.mcfunction +109 -0
- package/dist/data/readme_demo/function/acos_approx.mcfunction +7 -0
- package/dist/data/readme_demo/function/approx_eq.mcfunction +10 -0
- package/dist/data/readme_demo/function/approx_eq__merge_1.mcfunction +3 -0
- package/dist/data/readme_demo/function/approx_eq__merge_3.mcfunction +2 -0
- package/dist/data/readme_demo/function/approx_eq__then_0.mcfunction +4 -0
- package/dist/data/readme_demo/function/approx_eq__then_2.mcfunction +2 -0
- package/dist/data/readme_demo/function/asin_approx.mcfunction +5 -0
- package/dist/data/readme_demo/function/asin_approx__merge_1.mcfunction +3 -0
- package/dist/data/readme_demo/function/asin_approx__merge_10.mcfunction +5 -0
- package/dist/data/readme_demo/function/asin_approx__merge_4.mcfunction +12 -0
- package/dist/data/readme_demo/function/asin_approx__merge_7.mcfunction +14 -0
- package/dist/data/readme_demo/function/asin_approx__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/asin_approx__then_3.mcfunction +2 -0
- package/dist/data/readme_demo/function/asin_approx__then_6.mcfunction +2 -0
- package/dist/data/readme_demo/function/asin_approx__then_9.mcfunction +2 -0
- package/dist/data/readme_demo/function/cbrt_fx.mcfunction +5 -0
- package/dist/data/readme_demo/function/cbrt_fx__loop_body_6.mcfunction +7 -0
- package/dist/data/readme_demo/function/cbrt_fx__loop_exit_7.mcfunction +1 -0
- package/dist/data/readme_demo/function/cbrt_fx__loop_header_5.mcfunction +4 -0
- package/dist/data/readme_demo/function/cbrt_fx__merge_1.mcfunction +8 -0
- package/dist/data/readme_demo/function/cbrt_fx__merge_11.mcfunction +5 -0
- package/dist/data/readme_demo/function/cbrt_fx__merge_13.mcfunction +4 -0
- package/dist/data/readme_demo/function/cbrt_fx__merge_4.mcfunction +2 -0
- package/dist/data/readme_demo/function/cbrt_fx__merge_9.mcfunction +13 -0
- package/dist/data/readme_demo/function/cbrt_fx__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/cbrt_fx__then_10.mcfunction +2 -0
- package/dist/data/readme_demo/function/cbrt_fx__then_12.mcfunction +2 -0
- package/dist/data/readme_demo/function/cbrt_fx__then_3.mcfunction +2 -0
- package/dist/data/readme_demo/function/cbrt_fx__then_8.mcfunction +2 -0
- package/dist/data/readme_demo/function/cbrt_newton.mcfunction +5 -0
- package/dist/data/readme_demo/function/cbrt_newton__else_7.mcfunction +2 -0
- package/dist/data/readme_demo/function/cbrt_newton__merge_1.mcfunction +11 -0
- package/dist/data/readme_demo/function/cbrt_newton__merge_4.mcfunction +1 -0
- package/dist/data/readme_demo/function/cbrt_newton__merge_6.mcfunction +1 -0
- package/dist/data/readme_demo/function/cbrt_newton__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/cbrt_newton__then_3.mcfunction +17 -0
- package/dist/data/readme_demo/function/cbrt_newton__then_5.mcfunction +11 -0
- package/dist/data/readme_demo/function/ceil_div.mcfunction +9 -0
- package/dist/data/readme_demo/function/combinations.mcfunction +6 -0
- package/dist/data/readme_demo/function/combinations__loop_body_9.mcfunction +15 -0
- package/dist/data/readme_demo/function/combinations__loop_exit_10.mcfunction +1 -0
- package/dist/data/readme_demo/function/combinations__loop_header_8.mcfunction +3 -0
- package/dist/data/readme_demo/function/combinations__merge_1.mcfunction +3 -0
- package/dist/data/readme_demo/function/combinations__merge_4.mcfunction +6 -0
- package/dist/data/readme_demo/function/combinations__merge_7.mcfunction +3 -0
- package/dist/data/readme_demo/function/combinations__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/combinations__then_3.mcfunction +2 -0
- package/dist/data/readme_demo/function/combinations__then_6.mcfunction +4 -0
- package/dist/data/readme_demo/function/cos_fixed.mcfunction +7 -0
- package/dist/data/readme_demo/function/cubic_disc_fx.mcfunction +26 -0
- package/dist/data/readme_demo/function/cubic_newton.mcfunction +8 -0
- package/dist/data/readme_demo/function/cubic_newton__loop_body_1.mcfunction +55 -0
- package/dist/data/readme_demo/function/cubic_newton__loop_exit_2.mcfunction +1 -0
- package/dist/data/readme_demo/function/cubic_newton__loop_header_0.mcfunction +4 -0
- package/dist/data/readme_demo/function/cubic_newton__merge_10.mcfunction +1 -0
- package/dist/data/readme_demo/function/cubic_newton__merge_4.mcfunction +4 -0
- package/dist/data/readme_demo/function/cubic_newton__merge_6.mcfunction +4 -0
- package/dist/data/readme_demo/function/cubic_newton__merge_8.mcfunction +4 -0
- package/dist/data/readme_demo/function/cubic_newton__then_3.mcfunction +2 -0
- package/dist/data/readme_demo/function/cubic_newton__then_5.mcfunction +13 -0
- package/dist/data/readme_demo/function/cubic_newton__then_7.mcfunction +4 -0
- package/dist/data/readme_demo/function/cubic_newton__then_9.mcfunction +2 -0
- package/dist/data/readme_demo/function/divfix.mcfunction +6 -0
- package/dist/data/readme_demo/function/divfix__merge_1.mcfunction +6 -0
- package/dist/data/readme_demo/function/divfix__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/exp_fx.mcfunction +16 -0
- package/dist/data/readme_demo/function/exp_fx__loop_body_10.mcfunction +8 -0
- package/dist/data/readme_demo/function/exp_fx__loop_body_5.mcfunction +8 -0
- package/dist/data/readme_demo/function/exp_fx__loop_exit_11.mcfunction +1 -0
- package/dist/data/readme_demo/function/exp_fx__loop_exit_6.mcfunction +1 -0
- package/dist/data/readme_demo/function/exp_fx__loop_header_4.mcfunction +3 -0
- package/dist/data/readme_demo/function/exp_fx__loop_header_9.mcfunction +3 -0
- package/dist/data/readme_demo/function/exp_fx__merge_1.mcfunction +47 -0
- package/dist/data/readme_demo/function/exp_fx__merge_3.mcfunction +4 -0
- package/dist/data/readme_demo/function/exp_fx__merge_8.mcfunction +1 -0
- package/dist/data/readme_demo/function/exp_fx__then_0.mcfunction +7 -0
- package/dist/data/readme_demo/function/exp_fx__then_2.mcfunction +2 -0
- package/dist/data/readme_demo/function/exp_fx__then_7.mcfunction +5 -0
- package/dist/data/readme_demo/function/factorial.mcfunction +5 -0
- package/dist/data/readme_demo/function/factorial__loop_body_4.mcfunction +7 -0
- package/dist/data/readme_demo/function/factorial__loop_exit_5.mcfunction +1 -0
- package/dist/data/readme_demo/function/factorial__loop_header_3.mcfunction +3 -0
- package/dist/data/readme_demo/function/factorial__merge_1.mcfunction +3 -0
- package/dist/data/readme_demo/function/factorial__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/gamma_int.mcfunction +5 -0
- package/dist/data/readme_demo/function/gamma_int__merge_1.mcfunction +6 -0
- package/dist/data/readme_demo/function/gamma_int__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/gcd.mcfunction +7 -0
- package/dist/data/readme_demo/function/gcd__loop_body_5.mcfunction +5 -0
- package/dist/data/readme_demo/function/gcd__loop_exit_6.mcfunction +1 -0
- package/dist/data/readme_demo/function/gcd__loop_header_4.mcfunction +4 -0
- package/dist/data/readme_demo/function/gcd__merge_1.mcfunction +5 -0
- package/dist/data/readme_demo/function/gcd__merge_3.mcfunction +1 -0
- package/dist/data/readme_demo/function/gcd__then_0.mcfunction +4 -0
- package/dist/data/readme_demo/function/gcd__then_2.mcfunction +4 -0
- package/dist/data/readme_demo/function/isqrt.mcfunction +5 -0
- package/dist/data/readme_demo/function/isqrt__loop_body_10.mcfunction +8 -0
- package/dist/data/readme_demo/function/isqrt__loop_body_13.mcfunction +11 -0
- package/dist/data/readme_demo/function/isqrt__loop_body_7.mcfunction +8 -0
- package/dist/data/readme_demo/function/isqrt__loop_exit_11.mcfunction +2 -0
- package/dist/data/readme_demo/function/isqrt__loop_exit_14.mcfunction +1 -0
- package/dist/data/readme_demo/function/isqrt__loop_exit_8.mcfunction +9 -0
- package/dist/data/readme_demo/function/isqrt__loop_header_12.mcfunction +4 -0
- package/dist/data/readme_demo/function/isqrt__loop_header_6.mcfunction +4 -0
- package/dist/data/readme_demo/function/isqrt__loop_header_9.mcfunction +3 -0
- package/dist/data/readme_demo/function/isqrt__merge_1.mcfunction +4 -0
- package/dist/data/readme_demo/function/isqrt__merge_16.mcfunction +5 -0
- package/dist/data/readme_demo/function/isqrt__merge_4.mcfunction +3 -0
- package/dist/data/readme_demo/function/isqrt__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/isqrt__then_15.mcfunction +1 -0
- package/dist/data/readme_demo/function/isqrt__then_3.mcfunction +2 -0
- package/dist/data/readme_demo/function/lcm.mcfunction +11 -0
- package/dist/data/readme_demo/function/lcm__merge_1.mcfunction +5 -0
- package/dist/data/readme_demo/function/lcm__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/lerp.mcfunction +13 -0
- package/dist/data/readme_demo/function/ln.mcfunction +9 -0
- package/dist/data/readme_demo/function/ln__loop_body_1.mcfunction +8 -0
- package/dist/data/readme_demo/function/ln__loop_body_4.mcfunction +8 -0
- package/dist/data/readme_demo/function/ln__loop_exit_2.mcfunction +1 -0
- package/dist/data/readme_demo/function/ln__loop_exit_5.mcfunction +37 -0
- package/dist/data/readme_demo/function/ln__loop_header_0.mcfunction +3 -0
- package/dist/data/readme_demo/function/ln__loop_header_3.mcfunction +6 -0
- package/dist/data/readme_demo/function/load.mcfunction +1 -0
- package/dist/data/readme_demo/function/log10_fx.mcfunction +11 -0
- package/dist/data/readme_demo/function/log2_fx.mcfunction +11 -0
- package/dist/data/readme_demo/function/log2_int.mcfunction +5 -0
- package/dist/data/readme_demo/function/log2_int__loop_body_4.mcfunction +8 -0
- package/dist/data/readme_demo/function/log2_int__loop_exit_5.mcfunction +1 -0
- package/dist/data/readme_demo/function/log2_int__loop_header_3.mcfunction +4 -0
- package/dist/data/readme_demo/function/log2_int__merge_1.mcfunction +3 -0
- package/dist/data/readme_demo/function/log2_int__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/loga_fx.mcfunction +10 -0
- package/dist/data/readme_demo/function/loga_fx__merge_1.mcfunction +9 -0
- package/dist/data/readme_demo/function/loga_fx__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/map.mcfunction +12 -0
- package/dist/data/readme_demo/function/map__merge_1.mcfunction +11 -0
- package/dist/data/readme_demo/function/map__then_0.mcfunction +1 -0
- package/dist/data/readme_demo/function/mulfix.mcfunction +8 -0
- package/dist/data/readme_demo/function/newton_step.mcfunction +7 -0
- package/dist/data/readme_demo/function/newton_step__merge_1.mcfunction +8 -0
- package/dist/data/readme_demo/function/newton_step__then_0.mcfunction +1 -0
- package/dist/data/readme_demo/function/pow_int.mcfunction +6 -0
- package/dist/data/readme_demo/function/pow_int__loop_body_4.mcfunction +7 -0
- package/dist/data/readme_demo/function/pow_int__loop_exit_5.mcfunction +1 -0
- package/dist/data/readme_demo/function/pow_int__loop_header_3.mcfunction +4 -0
- package/dist/data/readme_demo/function/pow_int__merge_1.mcfunction +4 -0
- package/dist/data/readme_demo/function/pow_int__merge_7.mcfunction +8 -0
- package/dist/data/readme_demo/function/pow_int__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/pow_int__then_6.mcfunction +4 -0
- package/dist/data/readme_demo/function/quadratic_disc.mcfunction +12 -0
- package/dist/data/readme_demo/function/quadratic_x1.mcfunction +7 -0
- package/dist/data/readme_demo/function/quadratic_x1__merge_1.mcfunction +13 -0
- package/dist/data/readme_demo/function/quadratic_x1__merge_4.mcfunction +15 -0
- package/dist/data/readme_demo/function/quadratic_x1__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/quadratic_x1__then_3.mcfunction +2 -0
- package/dist/data/readme_demo/function/quadratic_x2.mcfunction +7 -0
- package/dist/data/readme_demo/function/quadratic_x2__merge_1.mcfunction +13 -0
- package/dist/data/readme_demo/function/quadratic_x2__merge_4.mcfunction +15 -0
- package/dist/data/readme_demo/function/quadratic_x2__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/quadratic_x2__then_3.mcfunction +2 -0
- package/dist/data/readme_demo/function/sign.mcfunction +5 -0
- package/dist/data/readme_demo/function/sign__merge_1.mcfunction +4 -0
- package/dist/data/readme_demo/function/sign__merge_4.mcfunction +2 -0
- package/dist/data/readme_demo/function/sign__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/sign__then_3.mcfunction +2 -0
- package/dist/data/readme_demo/function/simpson_step.mcfunction +16 -0
- package/dist/data/readme_demo/function/sin_fixed.mcfunction +9 -0
- package/dist/data/readme_demo/function/sin_fixed__merge_1.mcfunction +4 -0
- package/dist/data/readme_demo/function/sin_fixed__merge_3.mcfunction +4 -0
- package/dist/data/readme_demo/function/sin_fixed__merge_6.mcfunction +4 -0
- package/dist/data/readme_demo/function/sin_fixed__merge_9.mcfunction +10 -0
- package/dist/data/readme_demo/function/sin_fixed__then_0.mcfunction +4 -0
- package/dist/data/readme_demo/function/sin_fixed__then_2.mcfunction +6 -0
- package/dist/data/readme_demo/function/sin_fixed__then_5.mcfunction +8 -0
- package/dist/data/readme_demo/function/sin_fixed__then_8.mcfunction +10 -0
- package/dist/data/readme_demo/function/smootherstep.mcfunction +10 -0
- package/dist/data/readme_demo/function/smootherstep__merge_1.mcfunction +12 -0
- package/dist/data/readme_demo/function/smootherstep__merge_4.mcfunction +4 -0
- package/dist/data/readme_demo/function/smootherstep__merge_6.mcfunction +27 -0
- package/dist/data/readme_demo/function/smootherstep__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/smootherstep__then_3.mcfunction +2 -0
- package/dist/data/readme_demo/function/smootherstep__then_5.mcfunction +2 -0
- package/dist/data/readme_demo/function/smoothstep.mcfunction +10 -0
- package/dist/data/readme_demo/function/smoothstep__merge_1.mcfunction +12 -0
- package/dist/data/readme_demo/function/smoothstep__merge_4.mcfunction +4 -0
- package/dist/data/readme_demo/function/smoothstep__merge_6.mcfunction +15 -0
- package/dist/data/readme_demo/function/smoothstep__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/smoothstep__then_3.mcfunction +2 -0
- package/dist/data/readme_demo/function/smoothstep__then_5.mcfunction +2 -0
- package/dist/data/readme_demo/function/solve2x2_x.mcfunction +17 -0
- package/dist/data/readme_demo/function/solve2x2_x__merge_1.mcfunction +12 -0
- package/dist/data/readme_demo/function/solve2x2_x__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/solve2x2_y.mcfunction +17 -0
- package/dist/data/readme_demo/function/solve2x2_y__merge_1.mcfunction +12 -0
- package/dist/data/readme_demo/function/solve2x2_y__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/sqrt_fixed.mcfunction +8 -0
- package/dist/data/readme_demo/function/sqrt_fx.mcfunction +8 -0
- package/dist/data/readme_demo/function/start.mcfunction +2 -0
- package/dist/data/readme_demo/function/stop.mcfunction +1 -0
- package/dist/data/readme_demo/function/trapezoid_step.mcfunction +11 -0
- package/dist/data/stdextra/function/__load.mcfunction +2 -0
- package/dist/data/stdextra/function/load.mcfunction +1 -0
- package/dist/data/stdextra/function/test_bigint.mcfunction +52 -0
- package/dist/data/stdextra/function/test_bits.mcfunction +33 -0
- package/dist/data/stdextra/function/test_list_sort.mcfunction +55 -0
- package/dist/data/stdextra/function/test_random.mcfunction +17 -0
- package/dist/data/stdextra/function/test_random__merge_1.mcfunction +4 -0
- package/dist/data/stdextra/function/test_random__merge_11.mcfunction +1 -0
- package/dist/data/stdextra/function/test_random__merge_3.mcfunction +14 -0
- package/dist/data/stdextra/function/test_random__merge_5.mcfunction +8 -0
- package/dist/data/stdextra/function/test_random__merge_7.mcfunction +1 -0
- package/dist/data/stdextra/function/test_random__merge_9.mcfunction +1 -0
- package/dist/data/stdextra/function/test_random__then_0.mcfunction +4 -0
- package/dist/data/stdextra/function/test_random__then_10.mcfunction +2 -0
- package/dist/data/stdextra/function/test_random__then_2.mcfunction +2 -0
- package/dist/data/stdextra/function/test_random__then_4.mcfunction +4 -0
- package/dist/data/stdextra/function/test_random__then_6.mcfunction +2 -0
- package/dist/data/stdextra/function/test_random__then_8.mcfunction +4 -0
- package/dist/data/test/function/__dyn_idx_test_arrays_nums.mcfunction +1 -0
- package/dist/data/test/function/__dyn_idx_test_arrays_parent.mcfunction +1 -0
- package/dist/data/test/function/__dyn_idx_test_arrays_queue.mcfunction +1 -0
- package/dist/data/test/function/__dyn_idx_test_arrays_rev.mcfunction +1 -0
- package/dist/data/test/function/__dyn_idx_test_arrays_visited.mcfunction +1 -0
- package/dist/data/test/function/__dyn_wrt_test_arrays_parent.mcfunction +1 -0
- package/dist/data/test/function/__dyn_wrt_test_arrays_visited.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_1.mcfunction +2 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_1__loop_body_1.mcfunction +17 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_1__loop_body_1_continue.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_1__loop_body_1_yield.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_1__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_1__loop_header_0_exit.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2.mcfunction +2 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__else_8.mcfunction +19 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__loop_body_4.mcfunction +9 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__loop_header_3.mcfunction +3 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__loop_header_3_exit.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__merge_10.mcfunction +11 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__merge_12.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__merge_14.mcfunction +11 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__merge_16.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__merge_18.mcfunction +11 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__merge_20.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__merge_22.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__merge_24.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__merge_7.mcfunction +6 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__merge_7_continue.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__merge_7_yield.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__then_11.mcfunction +15 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__then_13.mcfunction +13 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__then_15.mcfunction +15 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__then_17.mcfunction +13 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__then_19.mcfunction +15 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__then_21.mcfunction +13 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__then_23.mcfunction +15 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__then_6.mcfunction +2 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__then_9.mcfunction +13 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_3.mcfunction +2 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_3__else_32.mcfunction +4 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_3__loop_body_28.mcfunction +6 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_3__loop_header_27.mcfunction +4 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_3__loop_header_27_exit.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_3__merge_31.mcfunction +6 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_3__merge_31_continue.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_3__merge_31_yield.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_3__then_30.mcfunction +2 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_4.mcfunction +2 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_4__loop_body_34.mcfunction +16 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_4__loop_body_34_continue.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_4__loop_body_34_yield.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_4__loop_header_33.mcfunction +4 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_4__loop_header_33_exit.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_5.mcfunction +16 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_5__merge_26.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_tick.mcfunction +4 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_tick__call_1.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_tick__call_2.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_tick__call_3.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_tick__call_4.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_tick__call_5.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_tick__check_2.mcfunction +4 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_tick__check_3.mcfunction +4 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_tick__check_4.mcfunction +4 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_tick__check_5.mcfunction +4 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_tick__done.mcfunction +1 -0
- package/dist/data/test/function/_hsl_chroma_x.mcfunction +1 -2
- package/dist/data/test/function/aabb_contains.mcfunction +1 -2
- package/dist/data/test/function/aabb_contains__merge_1.mcfunction +1 -2
- package/dist/data/test/function/aabb_contains__merge_10.mcfunction +1 -2
- package/dist/data/test/function/aabb_contains__merge_13.mcfunction +1 -2
- package/dist/data/test/function/aabb_contains__merge_4.mcfunction +1 -2
- package/dist/data/test/function/aabb_contains__merge_7.mcfunction +1 -2
- package/dist/data/test/function/acos_approx.mcfunction +7 -0
- package/dist/data/test/function/add_to_team.mcfunction +5 -0
- package/dist/data/test/function/angle_diff.mcfunction +1 -2
- package/dist/data/test/function/angle_normalize__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/angle_normalize__loop_header_3.mcfunction +1 -2
- package/dist/data/test/function/angry_at.mcfunction +1 -0
- package/dist/data/test/function/apply_damage.mcfunction +12 -0
- package/dist/data/test/function/apply_damage__else_2.mcfunction +2 -0
- package/dist/data/test/function/apply_damage__merge_1.mcfunction +1 -0
- package/dist/data/test/function/apply_damage__then_0.mcfunction +2 -0
- package/dist/data/test/function/arr_test.mcfunction +4 -0
- package/dist/data/test/function/asin_approx.mcfunction +5 -0
- package/dist/data/test/function/asin_approx__merge_1.mcfunction +3 -0
- package/dist/data/test/function/asin_approx__merge_10.mcfunction +5 -0
- package/dist/data/test/function/asin_approx__merge_4.mcfunction +12 -0
- package/dist/data/test/function/asin_approx__merge_7.mcfunction +14 -0
- package/dist/data/test/function/asin_approx__then_0.mcfunction +2 -0
- package/dist/data/test/function/asin_approx__then_3.mcfunction +2 -0
- package/dist/data/test/function/asin_approx__then_6.mcfunction +2 -0
- package/dist/data/test/function/asin_approx__then_9.mcfunction +2 -0
- package/dist/data/test/function/barrier_wall.mcfunction +1 -0
- package/dist/data/test/function/bernoulli.mcfunction +1 -2
- package/dist/data/test/function/bernoulli__merge_1.mcfunction +1 -2
- package/dist/data/test/function/bigint_chunk.mcfunction +2 -0
- package/dist/data/test/function/bigint_div_small.mcfunction +6 -0
- package/dist/data/test/function/bigint_div_small__loop_body_1.mcfunction +12 -0
- package/dist/data/test/function/bigint_div_small__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/bigint_div_small__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/bigint_mod_small.mcfunction +6 -0
- package/dist/data/test/function/bigint_mod_small__loop_body_1.mcfunction +12 -0
- package/dist/data/test/function/bigint_mod_small__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/bigint_mod_small__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/bit_and__loop_body_1.mcfunction +1 -2
- package/dist/data/test/function/bit_and__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/bit_and__then_3.mcfunction +1 -2
- package/dist/data/test/function/bit_clear__loop_exit_2.mcfunction +1 -2
- package/dist/data/test/function/bit_clear__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/bit_get__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/bit_not__loop_body_1.mcfunction +1 -2
- package/dist/data/test/function/bit_not__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/bit_or__loop_body_1.mcfunction +1 -2
- package/dist/data/test/function/bit_or__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/bit_or__merge_4.mcfunction +1 -2
- package/dist/data/test/function/bit_or__then_5.mcfunction +1 -2
- package/dist/data/test/function/bit_set__loop_exit_2.mcfunction +1 -2
- package/dist/data/test/function/bit_set__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/bit_shl__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/bit_shr__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/bit_toggle__loop_exit_2.mcfunction +1 -2
- package/dist/data/test/function/bit_toggle__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/bit_xor__loop_body_1.mcfunction +1 -2
- package/dist/data/test/function/bit_xor__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/buff_all.mcfunction +22 -0
- package/dist/data/test/function/cbrt_newton.mcfunction +5 -0
- package/dist/data/test/function/cbrt_newton__else_7.mcfunction +2 -0
- package/dist/data/test/function/cbrt_newton__merge_1.mcfunction +11 -0
- package/dist/data/test/function/cbrt_newton__merge_4.mcfunction +1 -0
- package/dist/data/test/function/cbrt_newton__merge_6.mcfunction +1 -0
- package/dist/data/test/function/cbrt_newton__then_0.mcfunction +2 -0
- package/dist/data/test/function/cbrt_newton__then_3.mcfunction +17 -0
- package/dist/data/test/function/cbrt_newton__then_5.mcfunction +11 -0
- package/dist/data/test/function/check_holding_item.mcfunction +1 -0
- package/dist/data/test/function/check_look_down.mcfunction +1 -0
- package/dist/data/test/function/check_look_down__foreach_t0.mcfunction +2 -0
- package/dist/data/test/function/check_look_straight.mcfunction +1 -0
- package/dist/data/test/function/check_look_straight__foreach_t0.mcfunction +2 -0
- package/dist/data/test/function/check_look_up.mcfunction +1 -0
- package/dist/data/test/function/check_look_up__foreach_t0.mcfunction +2 -0
- package/dist/data/test/function/cleanup_teams.mcfunction +8 -0
- package/dist/data/test/function/clear_area.mcfunction +1 -0
- package/dist/data/test/function/clear_effect.mcfunction +1 -0
- package/dist/data/test/function/clear_effects.mcfunction +1 -0
- package/dist/data/test/function/clear_inventory.mcfunction +1 -0
- package/dist/data/test/function/cooldown_ready.mcfunction +7 -0
- package/dist/data/test/function/cooldown_ready__merge_1.mcfunction +4 -0
- package/dist/data/test/function/cooldown_ready__merge_4.mcfunction +2 -0
- package/dist/data/test/function/cooldown_ready__then_0.mcfunction +2 -0
- package/dist/data/test/function/cooldown_ready__then_3.mcfunction +2 -0
- package/dist/data/test/function/cooldown_start.mcfunction +3 -0
- package/dist/data/test/function/cooldown_tick.mcfunction +7 -0
- package/dist/data/test/function/cooldown_tick__else_5.mcfunction +2 -0
- package/dist/data/test/function/cooldown_tick__merge_1.mcfunction +4 -0
- package/dist/data/test/function/cooldown_tick__merge_4.mcfunction +1 -0
- package/dist/data/test/function/cooldown_tick__merge_7.mcfunction +1 -0
- package/dist/data/test/function/cooldown_tick__then_0.mcfunction +1 -0
- package/dist/data/test/function/cooldown_tick__then_3.mcfunction +7 -0
- package/dist/data/test/function/cooldown_tick__then_6.mcfunction +2 -0
- package/dist/data/test/function/cos_hp.mcfunction +4 -2
- package/dist/data/test/function/create_blue_team.mcfunction +10 -0
- package/dist/data/test/function/create_green_team.mcfunction +10 -0
- package/dist/data/test/function/create_health_bar.mcfunction +24 -0
- package/dist/data/test/function/create_progress_bar.mcfunction +24 -0
- package/dist/data/test/function/create_red_team.mcfunction +10 -0
- package/dist/data/test/function/create_team.mcfunction +8 -0
- package/dist/data/test/function/create_timer_bar.mcfunction +30 -0
- package/dist/data/test/function/create_yellow_team.mcfunction +10 -0
- package/dist/data/test/function/cubic_disc_fx.mcfunction +26 -0
- package/dist/data/test/function/cubic_newton.mcfunction +8 -0
- package/dist/data/test/function/cubic_newton__loop_body_1.mcfunction +55 -0
- package/dist/data/test/function/cubic_newton__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/cubic_newton__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/cubic_newton__merge_10.mcfunction +1 -0
- package/dist/data/test/function/cubic_newton__merge_4.mcfunction +4 -0
- package/dist/data/test/function/cubic_newton__merge_6.mcfunction +4 -0
- package/dist/data/test/function/cubic_newton__merge_8.mcfunction +4 -0
- package/dist/data/test/function/cubic_newton__then_3.mcfunction +2 -0
- package/dist/data/test/function/cubic_newton__then_5.mcfunction +13 -0
- package/dist/data/test/function/cubic_newton__then_7.mcfunction +4 -0
- package/dist/data/test/function/cubic_newton__then_9.mcfunction +2 -0
- package/dist/data/test/function/curve_length_2d.mcfunction +6 -0
- package/dist/data/test/function/curve_length_2d__loop_body_1.mcfunction +32 -0
- package/dist/data/test/function/curve_length_2d__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/curve_length_2d__loop_header_0.mcfunction +5 -0
- package/dist/data/test/function/cylinder_contains.mcfunction +1 -2
- package/dist/data/test/function/damage.mcfunction +9 -0
- package/dist/data/test/function/damage__else_2.mcfunction +2 -0
- package/dist/data/test/function/damage__merge_1.mcfunction +1 -0
- package/dist/data/test/function/damage__then_0.mcfunction +2 -0
- package/dist/data/test/function/deriv_central.mcfunction +7 -0
- package/dist/data/test/function/deriv_central__merge_1.mcfunction +10 -0
- package/dist/data/test/function/deriv_central__then_0.mcfunction +2 -0
- package/dist/data/test/function/deriv_forward.mcfunction +7 -0
- package/dist/data/test/function/deriv_forward__merge_1.mcfunction +8 -0
- package/dist/data/test/function/deriv_forward__then_0.mcfunction +2 -0
- package/dist/data/test/function/disable_fire_spread.mcfunction +1 -0
- package/dist/data/test/function/disable_keep_inventory.mcfunction +1 -0
- package/dist/data/test/function/disable_mob_griefing.mcfunction +1 -0
- package/dist/data/test/function/div3_hp.mcfunction +23 -0
- package/dist/data/test/function/div_hp.mcfunction +13 -0
- package/dist/data/test/function/draw_circle.mcfunction +8 -0
- package/dist/data/test/function/draw_circle__loop_body_1.mcfunction +34 -0
- package/dist/data/test/function/draw_circle__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/draw_circle__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/draw_helix.mcfunction +10 -0
- package/dist/data/test/function/draw_helix__loop_body_1.mcfunction +42 -0
- package/dist/data/test/function/draw_helix__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/draw_helix__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/draw_line_2d.mcfunction +9 -0
- package/dist/data/test/function/draw_line_2d__loop_body_1.mcfunction +34 -0
- package/dist/data/test/function/draw_line_2d__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/draw_line_2d__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/ease_in_expo.mcfunction +1 -2
- package/dist/data/test/function/ease_in_out_back.mcfunction +1 -2
- package/dist/data/test/function/ease_in_out_bounce.mcfunction +1 -2
- package/dist/data/test/function/ease_in_out_cubic.mcfunction +1 -2
- package/dist/data/test/function/ease_in_out_quad.mcfunction +1 -2
- package/dist/data/test/function/ease_in_out_sine.mcfunction +1 -2
- package/dist/data/test/function/ease_out_bounce.mcfunction +1 -2
- package/dist/data/test/function/ease_out_bounce__merge_1.mcfunction +1 -2
- package/dist/data/test/function/ease_out_bounce__merge_4.mcfunction +1 -2
- package/dist/data/test/function/ease_out_expo.mcfunction +1 -2
- package/dist/data/test/function/enable_keep_inventory.mcfunction +1 -0
- package/dist/data/test/function/end_sparkles_at.mcfunction +1 -0
- package/dist/data/test/function/enemy_health.mcfunction +2 -0
- package/dist/data/test/function/example_right_click.mcfunction +1 -0
- package/dist/data/test/function/example_right_click__foreach_t0.mcfunction +5 -0
- package/dist/data/test/function/example_right_click__foreach_t0__merge_1.mcfunction +1 -0
- package/dist/data/test/function/example_right_click__foreach_t0__then_0.mcfunction +3 -0
- package/dist/data/test/function/exp_dist_approx.mcfunction +1 -2
- package/dist/data/test/function/exp_dist_approx__merge_1.mcfunction +1 -2
- package/dist/data/test/function/exp_dist_approx__merge_3.mcfunction +1 -2
- package/dist/data/test/function/explosion_effect.mcfunction +1 -0
- package/dist/data/test/function/fbm_1d__loop_exit_2.mcfunction +1 -2
- package/dist/data/test/function/fbm_1d__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/fbm_2d__loop_exit_2.mcfunction +1 -2
- package/dist/data/test/function/fbm_2d__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/flames.mcfunction +1 -0
- package/dist/data/test/function/gather_all.mcfunction +8 -0
- package/dist/data/test/function/give_kit_archer.mcfunction +6 -0
- package/dist/data/test/function/give_kit_mage.mcfunction +5 -0
- package/dist/data/test/function/give_kit_warrior.mcfunction +6 -0
- package/dist/data/test/function/glass_box.mcfunction +2 -0
- package/dist/data/test/function/glow.mcfunction +1 -0
- package/dist/data/test/function/goto_arena.mcfunction +7 -0
- package/dist/data/test/function/goto_lobby.mcfunction +7 -0
- package/dist/data/test/function/happy_at.mcfunction +1 -0
- package/dist/data/test/function/hash_1d_pos.mcfunction +1 -2
- package/dist/data/test/function/hash_2d_pos.mcfunction +1 -2
- package/dist/data/test/function/heal.mcfunction +5 -0
- package/dist/data/test/function/heap_new.mcfunction +7 -0
- package/dist/data/test/function/heap_new__loop_body_1.mcfunction +7 -0
- package/dist/data/test/function/heap_new__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/heap_new__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/heap_peek.mcfunction +2 -0
- package/dist/data/test/function/heap_pop.mcfunction +4 -0
- package/dist/data/test/function/heap_pop__else_13.mcfunction +2 -0
- package/dist/data/test/function/heap_pop__loop_body_1.mcfunction +14 -0
- package/dist/data/test/function/heap_pop__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/heap_pop__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/heap_pop__merge_10.mcfunction +1 -0
- package/dist/data/test/function/heap_pop__merge_12.mcfunction +1 -0
- package/dist/data/test/function/heap_pop__merge_4.mcfunction +3 -0
- package/dist/data/test/function/heap_pop__merge_6.mcfunction +1 -0
- package/dist/data/test/function/heap_pop__merge_8.mcfunction +3 -0
- package/dist/data/test/function/heap_pop__then_11.mcfunction +2 -0
- package/dist/data/test/function/heap_pop__then_3.mcfunction +3 -0
- package/dist/data/test/function/heap_pop__then_5.mcfunction +2 -0
- package/dist/data/test/function/heap_pop__then_7.mcfunction +3 -0
- package/dist/data/test/function/heap_pop__then_9.mcfunction +2 -0
- package/dist/data/test/function/heap_push.mcfunction +6 -0
- package/dist/data/test/function/heap_push__else_5.mcfunction +2 -0
- package/dist/data/test/function/heap_push__else_8.mcfunction +2 -0
- package/dist/data/test/function/heap_push__loop_body_1.mcfunction +4 -0
- package/dist/data/test/function/heap_push__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/heap_push__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/heap_push__merge_4.mcfunction +1 -0
- package/dist/data/test/function/heap_push__merge_7.mcfunction +1 -0
- package/dist/data/test/function/heap_push__then_3.mcfunction +7 -0
- package/dist/data/test/function/heap_push__then_6.mcfunction +2 -0
- package/dist/data/test/function/heap_size.mcfunction +2 -0
- package/dist/data/test/function/hearts_at.mcfunction +1 -0
- package/dist/data/test/function/hide_bar.mcfunction +4 -0
- package/dist/data/test/function/hsl_to_b.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_b__merge_1.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_b__merge_12.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_b__merge_3.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_b__merge_6.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_b__merge_9.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_g.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_g__merge_1.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_g__merge_12.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_g__merge_3.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_g__merge_6.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_g__merge_9.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_r.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_r__merge_1.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_r__merge_12.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_r__merge_3.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_r__merge_6.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_r__merge_9.mcfunction +1 -2
- package/dist/data/test/function/init_div.mcfunction +1 -0
- package/dist/data/test/function/insertion_sort.mcfunction +4 -0
- package/dist/data/test/function/insertion_sort__else_11.mcfunction +2 -0
- package/dist/data/test/function/insertion_sort__else_8.mcfunction +2 -0
- package/dist/data/test/function/insertion_sort__loop_body_1.mcfunction +6 -0
- package/dist/data/test/function/insertion_sort__loop_body_4.mcfunction +4 -0
- package/dist/data/test/function/insertion_sort__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/insertion_sort__loop_exit_5.mcfunction +4 -0
- package/dist/data/test/function/insertion_sort__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/insertion_sort__loop_header_3.mcfunction +4 -0
- package/dist/data/test/function/insertion_sort__merge_10.mcfunction +1 -0
- package/dist/data/test/function/insertion_sort__merge_7.mcfunction +1 -0
- package/dist/data/test/function/insertion_sort__then_6.mcfunction +3 -0
- package/dist/data/test/function/insertion_sort__then_9.mcfunction +4 -0
- package/dist/data/test/function/insertion_sort_desc.mcfunction +4 -0
- package/dist/data/test/function/insertion_sort_desc__else_11.mcfunction +2 -0
- package/dist/data/test/function/insertion_sort_desc__else_8.mcfunction +2 -0
- package/dist/data/test/function/insertion_sort_desc__loop_body_1.mcfunction +6 -0
- package/dist/data/test/function/insertion_sort_desc__loop_body_4.mcfunction +4 -0
- package/dist/data/test/function/insertion_sort_desc__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/insertion_sort_desc__loop_exit_5.mcfunction +4 -0
- package/dist/data/test/function/insertion_sort_desc__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/insertion_sort_desc__loop_header_3.mcfunction +4 -0
- package/dist/data/test/function/insertion_sort_desc__merge_10.mcfunction +1 -0
- package/dist/data/test/function/insertion_sort_desc__merge_7.mcfunction +1 -0
- package/dist/data/test/function/insertion_sort_desc__then_6.mcfunction +3 -0
- package/dist/data/test/function/insertion_sort_desc__then_9.mcfunction +4 -0
- package/dist/data/test/function/integrate_simpson.mcfunction +7 -0
- package/dist/data/test/function/integrate_simpson__loop_body_6.mcfunction +7 -0
- package/dist/data/test/function/integrate_simpson__loop_exit_7.mcfunction +6 -0
- package/dist/data/test/function/integrate_simpson__loop_header_5.mcfunction +5 -0
- package/dist/data/test/function/integrate_simpson__merge_1.mcfunction +8 -0
- package/dist/data/test/function/integrate_simpson__merge_11.mcfunction +4 -0
- package/dist/data/test/function/integrate_simpson__merge_4.mcfunction +5 -0
- package/dist/data/test/function/integrate_simpson__merge_9.mcfunction +7 -0
- package/dist/data/test/function/integrate_simpson__then_0.mcfunction +6 -0
- package/dist/data/test/function/integrate_simpson__then_10.mcfunction +6 -0
- package/dist/data/test/function/integrate_simpson__then_3.mcfunction +4 -0
- package/dist/data/test/function/integrate_simpson__then_8.mcfunction +6 -0
- package/dist/data/test/function/integrate_trapezoid.mcfunction +7 -0
- package/dist/data/test/function/integrate_trapezoid__loop_body_4.mcfunction +7 -0
- package/dist/data/test/function/integrate_trapezoid__loop_exit_5.mcfunction +6 -0
- package/dist/data/test/function/integrate_trapezoid__loop_header_3.mcfunction +5 -0
- package/dist/data/test/function/integrate_trapezoid__merge_1.mcfunction +11 -0
- package/dist/data/test/function/integrate_trapezoid__then_0.mcfunction +2 -0
- package/dist/data/test/function/interactions_init.mcfunction +9 -0
- package/dist/data/test/function/invisible.mcfunction +1 -0
- package/dist/data/test/function/is_op.mcfunction +2 -0
- package/dist/data/test/function/is_op__exec_t1.mcfunction +1 -0
- package/dist/data/test/function/is_sneaking.mcfunction +5 -0
- package/dist/data/test/function/is_sneaking__merge_1.mcfunction +2 -0
- package/dist/data/test/function/is_sneaking__then_0.mcfunction +2 -0
- package/dist/data/test/function/jump.mcfunction +1 -0
- package/dist/data/test/function/launch_up.mcfunction +6 -0
- package/dist/data/test/function/list_max3.mcfunction +1 -2
- package/dist/data/test/function/list_max3__merge_1.mcfunction +1 -2
- package/dist/data/test/function/list_max5.mcfunction +1 -2
- package/dist/data/test/function/list_max5__merge_1.mcfunction +1 -2
- package/dist/data/test/function/list_max5__merge_3.mcfunction +1 -2
- package/dist/data/test/function/list_max5__merge_5.mcfunction +1 -2
- package/dist/data/test/function/list_min3.mcfunction +1 -2
- package/dist/data/test/function/list_min3__merge_1.mcfunction +1 -2
- package/dist/data/test/function/list_min5.mcfunction +1 -2
- package/dist/data/test/function/list_min5__merge_1.mcfunction +1 -2
- package/dist/data/test/function/list_min5__merge_3.mcfunction +1 -2
- package/dist/data/test/function/list_min5__merge_5.mcfunction +1 -2
- package/dist/data/test/function/list_sort_asc__loop_body_4.mcfunction +1 -2
- package/dist/data/test/function/list_sort_asc__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/list_sort_asc__loop_header_3.mcfunction +1 -2
- package/dist/data/test/function/list_sort_desc__loop_body_4.mcfunction +1 -2
- package/dist/data/test/function/list_sort_desc__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/list_sort_desc__loop_header_3.mcfunction +1 -2
- package/dist/data/test/function/max_heap_pop.mcfunction +4 -0
- package/dist/data/test/function/max_heap_pop__else_13.mcfunction +2 -0
- package/dist/data/test/function/max_heap_pop__loop_body_1.mcfunction +14 -0
- package/dist/data/test/function/max_heap_pop__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/max_heap_pop__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/max_heap_pop__merge_10.mcfunction +1 -0
- package/dist/data/test/function/max_heap_pop__merge_12.mcfunction +1 -0
- package/dist/data/test/function/max_heap_pop__merge_4.mcfunction +3 -0
- package/dist/data/test/function/max_heap_pop__merge_6.mcfunction +1 -0
- package/dist/data/test/function/max_heap_pop__merge_8.mcfunction +3 -0
- package/dist/data/test/function/max_heap_pop__then_11.mcfunction +2 -0
- package/dist/data/test/function/max_heap_pop__then_3.mcfunction +3 -0
- package/dist/data/test/function/max_heap_pop__then_5.mcfunction +2 -0
- package/dist/data/test/function/max_heap_pop__then_7.mcfunction +3 -0
- package/dist/data/test/function/max_heap_pop__then_9.mcfunction +2 -0
- package/dist/data/test/function/max_heap_push.mcfunction +6 -0
- package/dist/data/test/function/max_heap_push__else_5.mcfunction +2 -0
- package/dist/data/test/function/max_heap_push__else_8.mcfunction +2 -0
- package/dist/data/test/function/max_heap_push__loop_body_1.mcfunction +4 -0
- package/dist/data/test/function/max_heap_push__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/max_heap_push__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/max_heap_push__merge_4.mcfunction +1 -0
- package/dist/data/test/function/max_heap_push__merge_7.mcfunction +1 -0
- package/dist/data/test/function/max_heap_push__then_3.mcfunction +7 -0
- package/dist/data/test/function/max_heap_push__then_6.mcfunction +2 -0
- package/dist/data/test/function/newton_step.mcfunction +7 -0
- package/dist/data/test/function/newton_step__merge_1.mcfunction +8 -0
- package/dist/data/test/function/newton_step__then_0.mcfunction +1 -0
- package/dist/data/test/function/night_vision.mcfunction +1 -0
- package/dist/data/test/function/norm3_hp.mcfunction +43 -0
- package/dist/data/test/function/normal_approx12.mcfunction +1 -2
- package/dist/data/test/function/normal_approx12__merge_1.mcfunction +1 -2
- package/dist/data/test/function/normal_approx12__merge_11.mcfunction +1 -2
- package/dist/data/test/function/normal_approx12__merge_13.mcfunction +1 -2
- package/dist/data/test/function/normal_approx12__merge_15.mcfunction +1 -2
- package/dist/data/test/function/normal_approx12__merge_17.mcfunction +1 -2
- package/dist/data/test/function/normal_approx12__merge_19.mcfunction +1 -2
- package/dist/data/test/function/normal_approx12__merge_21.mcfunction +1 -2
- package/dist/data/test/function/normal_approx12__merge_3.mcfunction +1 -2
- package/dist/data/test/function/normal_approx12__merge_5.mcfunction +1 -2
- package/dist/data/test/function/normal_approx12__merge_7.mcfunction +1 -2
- package/dist/data/test/function/normal_approx12__merge_9.mcfunction +1 -2
- package/dist/data/test/function/on_double_sneak.mcfunction +1 -0
- package/dist/data/test/function/on_double_sneak__foreach_t0.mcfunction +9 -0
- package/dist/data/test/function/on_double_sneak__foreach_t0__merge_1.mcfunction +1 -0
- package/dist/data/test/function/on_double_sneak__foreach_t0__merge_3.mcfunction +2 -0
- package/dist/data/test/function/on_double_sneak__foreach_t0__then_0.mcfunction +6 -0
- package/dist/data/test/function/on_double_sneak__foreach_t0__then_2.mcfunction +2 -0
- package/dist/data/test/function/on_right_click.mcfunction +1 -0
- package/dist/data/test/function/on_right_click__foreach_t1.mcfunction +5 -0
- package/dist/data/test/function/on_right_click__foreach_t1__merge_1.mcfunction +1 -0
- package/dist/data/test/function/on_right_click__foreach_t1__then_0.mcfunction +3 -0
- package/dist/data/test/function/on_sneak_click.mcfunction +1 -0
- package/dist/data/test/function/on_sneak_click__foreach_t0.mcfunction +7 -0
- package/dist/data/test/function/on_sneak_click__foreach_t0__else_4.mcfunction +3 -0
- package/dist/data/test/function/on_sneak_click__foreach_t0__merge_1.mcfunction +1 -0
- package/dist/data/test/function/on_sneak_click__foreach_t0__merge_3.mcfunction +1 -0
- package/dist/data/test/function/on_sneak_click__foreach_t0__then_0.mcfunction +4 -0
- package/dist/data/test/function/on_sneak_click__foreach_t0__then_2.mcfunction +3 -0
- package/dist/data/test/function/on_sneak_start.mcfunction +1 -0
- package/dist/data/test/function/on_sneak_start__foreach_t0.mcfunction +5 -0
- package/dist/data/test/function/on_sneak_start__foreach_t0__else_2.mcfunction +2 -0
- package/dist/data/test/function/on_sneak_start__foreach_t0__merge_1.mcfunction +1 -0
- package/dist/data/test/function/on_sneak_start__foreach_t0__then_0.mcfunction +2 -0
- package/dist/data/test/function/particle_at_fx.mcfunction +1 -0
- package/dist/data/test/function/particle_dot.mcfunction +1 -0
- package/dist/data/test/function/pathfind_bfs.mcfunction +11 -0
- package/dist/data/test/function/pathfind_bfs__else_33.mcfunction +4 -0
- package/dist/data/test/function/pathfind_bfs__else_8.mcfunction +19 -0
- package/dist/data/test/function/pathfind_bfs__loop_body_1.mcfunction +10 -0
- package/dist/data/test/function/pathfind_bfs__loop_body_29.mcfunction +6 -0
- package/dist/data/test/function/pathfind_bfs__loop_body_35.mcfunction +9 -0
- package/dist/data/test/function/pathfind_bfs__loop_body_4.mcfunction +9 -0
- package/dist/data/test/function/pathfind_bfs__loop_exit_2.mcfunction +24 -0
- package/dist/data/test/function/pathfind_bfs__loop_exit_30.mcfunction +6 -0
- package/dist/data/test/function/pathfind_bfs__loop_exit_36.mcfunction +1 -0
- package/dist/data/test/function/pathfind_bfs__loop_exit_5.mcfunction +6 -0
- package/dist/data/test/function/pathfind_bfs__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/pathfind_bfs__loop_header_28.mcfunction +4 -0
- package/dist/data/test/function/pathfind_bfs__loop_header_3.mcfunction +3 -0
- package/dist/data/test/function/pathfind_bfs__loop_header_34.mcfunction +4 -0
- package/dist/data/test/function/pathfind_bfs__merge_10.mcfunction +11 -0
- package/dist/data/test/function/pathfind_bfs__merge_12.mcfunction +1 -0
- package/dist/data/test/function/pathfind_bfs__merge_14.mcfunction +11 -0
- package/dist/data/test/function/pathfind_bfs__merge_16.mcfunction +1 -0
- package/dist/data/test/function/pathfind_bfs__merge_18.mcfunction +11 -0
- package/dist/data/test/function/pathfind_bfs__merge_20.mcfunction +1 -0
- package/dist/data/test/function/pathfind_bfs__merge_22.mcfunction +1 -0
- package/dist/data/test/function/pathfind_bfs__merge_24.mcfunction +1 -0
- package/dist/data/test/function/pathfind_bfs__merge_26.mcfunction +5 -0
- package/dist/data/test/function/pathfind_bfs__merge_32.mcfunction +1 -0
- package/dist/data/test/function/pathfind_bfs__merge_7.mcfunction +1 -0
- package/dist/data/test/function/pathfind_bfs__then_11.mcfunction +15 -0
- package/dist/data/test/function/pathfind_bfs__then_13.mcfunction +13 -0
- package/dist/data/test/function/pathfind_bfs__then_15.mcfunction +15 -0
- package/dist/data/test/function/pathfind_bfs__then_17.mcfunction +13 -0
- package/dist/data/test/function/pathfind_bfs__then_19.mcfunction +15 -0
- package/dist/data/test/function/pathfind_bfs__then_21.mcfunction +13 -0
- package/dist/data/test/function/pathfind_bfs__then_23.mcfunction +15 -0
- package/dist/data/test/function/pathfind_bfs__then_25.mcfunction +1 -0
- package/dist/data/test/function/pathfind_bfs__then_31.mcfunction +2 -0
- package/dist/data/test/function/pathfind_bfs__then_6.mcfunction +3 -0
- package/dist/data/test/function/pathfind_bfs__then_9.mcfunction +13 -0
- package/dist/data/test/function/pathfind_bfs_coro.mcfunction +1 -0
- package/dist/data/test/function/pcg_output.mcfunction +1 -2
- package/dist/data/test/function/pf_heuristic.mcfunction +14 -0
- package/dist/data/test/function/pf_heuristic__merge_1.mcfunction +4 -0
- package/dist/data/test/function/pf_heuristic__merge_3.mcfunction +6 -0
- package/dist/data/test/function/pf_heuristic__then_0.mcfunction +4 -0
- package/dist/data/test/function/pf_heuristic__then_2.mcfunction +4 -0
- package/dist/data/test/function/pf_is_blocked.mcfunction +7 -0
- package/dist/data/test/function/pf_is_blocked__merge_1.mcfunction +4 -0
- package/dist/data/test/function/pf_is_blocked__merge_10.mcfunction +4 -0
- package/dist/data/test/function/pf_is_blocked__merge_4.mcfunction +4 -0
- package/dist/data/test/function/pf_is_blocked__merge_7.mcfunction +4 -0
- package/dist/data/test/function/pf_is_blocked__then_0.mcfunction +2 -0
- package/dist/data/test/function/pf_is_blocked__then_3.mcfunction +2 -0
- package/dist/data/test/function/pf_is_blocked__then_6.mcfunction +2 -0
- package/dist/data/test/function/pf_is_blocked__then_9.mcfunction +2 -0
- package/dist/data/test/function/pf_new_map.mcfunction +4 -0
- package/dist/data/test/function/pf_new_map__loop_body_1.mcfunction +7 -0
- package/dist/data/test/function/pf_new_map__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/pf_new_map__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/pf_noop.mcfunction +1 -0
- package/dist/data/test/function/pf_pack.mcfunction +8 -0
- package/dist/data/test/function/pf_set_blocked.mcfunction +5 -0
- package/dist/data/test/function/pf_set_open.mcfunction +5 -0
- package/dist/data/test/function/pf_unpack_x.mcfunction +5 -0
- package/dist/data/test/function/pf_unpack_z.mcfunction +5 -0
- package/dist/data/test/function/popcount__loop_body_1.mcfunction +1 -2
- package/dist/data/test/function/popcount__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/portal_effect.mcfunction +1 -0
- package/dist/data/test/function/random_bool.mcfunction +1 -2
- package/dist/data/test/function/random_range.mcfunction +1 -2
- package/dist/data/test/function/regen.mcfunction +1 -0
- package/dist/data/test/function/remove_bar.mcfunction +3 -0
- package/dist/data/test/function/remove_from_teams.mcfunction +3 -0
- package/dist/data/test/function/remove_item.mcfunction +1 -0
- package/dist/data/test/function/resistance.mcfunction +1 -0
- package/dist/data/test/function/rgb_to_h.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_h__merge_1.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_h__merge_12.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_h__merge_3.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_h__merge_5.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_h__merge_7.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_h__merge_9.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_h__then_11.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_l.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_l__merge_1.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_l__merge_3.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_l__merge_5.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_s.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_s__merge_1.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_s__merge_3.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_s__merge_5.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_s__merge_7.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_s__merge_9.mcfunction +1 -2
- package/dist/data/test/function/riemann_left.mcfunction +6 -0
- package/dist/data/test/function/riemann_left__loop_body_1.mcfunction +7 -0
- package/dist/data/test/function/riemann_left__loop_exit_2.mcfunction +6 -0
- package/dist/data/test/function/riemann_left__loop_header_0.mcfunction +5 -0
- package/dist/data/test/function/riemann_mid.mcfunction +6 -0
- package/dist/data/test/function/riemann_mid__loop_body_1.mcfunction +7 -0
- package/dist/data/test/function/riemann_mid__loop_exit_2.mcfunction +6 -0
- package/dist/data/test/function/riemann_mid__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/riemann_right.mcfunction +6 -0
- package/dist/data/test/function/riemann_right__loop_body_1.mcfunction +7 -0
- package/dist/data/test/function/riemann_right__loop_exit_2.mcfunction +6 -0
- package/dist/data/test/function/riemann_right__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/running_m2.mcfunction +16 -0
- package/dist/data/test/function/running_mean.mcfunction +7 -0
- package/dist/data/test/function/running_mean__merge_1.mcfunction +13 -0
- package/dist/data/test/function/running_mean__then_0.mcfunction +1 -0
- package/dist/data/test/function/second_deriv.mcfunction +8 -0
- package/dist/data/test/function/second_deriv__merge_1.mcfunction +14 -0
- package/dist/data/test/function/second_deriv__then_0.mcfunction +2 -0
- package/dist/data/test/function/set_day.mcfunction +1 -0
- package/dist/data/test/function/set_easy.mcfunction +1 -0
- package/dist/data/test/function/set_hard.mcfunction +1 -0
- package/dist/data/test/function/set_midnight.mcfunction +1 -0
- package/dist/data/test/function/set_night.mcfunction +1 -0
- package/dist/data/test/function/set_noon.mcfunction +1 -0
- package/dist/data/test/function/set_normal.mcfunction +1 -0
- package/dist/data/test/function/set_peaceful.mcfunction +1 -0
- package/dist/data/test/function/setup_four_teams.mcfunction +4 -0
- package/dist/data/test/function/setup_two_teams.mcfunction +2 -0
- package/dist/data/test/function/show_bar.mcfunction +4 -0
- package/dist/data/test/function/simpson_step.mcfunction +16 -0
- package/dist/data/test/function/sin_hp.mcfunction +4 -2
- package/dist/data/test/function/slow_fall.mcfunction +1 -0
- package/dist/data/test/function/smoke.mcfunction +1 -0
- package/dist/data/test/function/sort2_max.mcfunction +1 -2
- package/dist/data/test/function/sort2_min.mcfunction +1 -2
- package/dist/data/test/function/sort3.mcfunction +1 -2
- package/dist/data/test/function/sort3__merge_1.mcfunction +1 -2
- package/dist/data/test/function/sort3__merge_3.mcfunction +1 -2
- package/dist/data/test/function/sort3__merge_5.mcfunction +1 -2
- package/dist/data/test/function/sort3__merge_7.mcfunction +1 -2
- package/dist/data/test/function/sort4.mcfunction +1 -2
- package/dist/data/test/function/sort4__merge_1.mcfunction +1 -2
- package/dist/data/test/function/sort4__merge_11.mcfunction +1 -2
- package/dist/data/test/function/sort4__merge_14.mcfunction +1 -2
- package/dist/data/test/function/sort4__merge_3.mcfunction +1 -2
- package/dist/data/test/function/sort4__merge_5.mcfunction +1 -2
- package/dist/data/test/function/sort4__merge_7.mcfunction +1 -2
- package/dist/data/test/function/sort4__merge_9.mcfunction +1 -2
- package/dist/data/test/function/sort5.mcfunction +1 -2
- package/dist/data/test/function/sort5__merge_1.mcfunction +1 -2
- package/dist/data/test/function/sort5__merge_11.mcfunction +1 -2
- package/dist/data/test/function/sort5__merge_13.mcfunction +1 -2
- package/dist/data/test/function/sort5__merge_15.mcfunction +1 -2
- package/dist/data/test/function/sort5__merge_17.mcfunction +1 -2
- package/dist/data/test/function/sort5__merge_19.mcfunction +1 -2
- package/dist/data/test/function/sort5__merge_22.mcfunction +1 -2
- package/dist/data/test/function/sort5__merge_25.mcfunction +1 -2
- package/dist/data/test/function/sort5__merge_3.mcfunction +1 -2
- package/dist/data/test/function/sort5__merge_5.mcfunction +1 -2
- package/dist/data/test/function/sort5__merge_7.mcfunction +1 -2
- package/dist/data/test/function/sort5__merge_9.mcfunction +1 -2
- package/dist/data/test/function/sort_merge.mcfunction +10 -0
- package/dist/data/test/function/sort_merge__else_11.mcfunction +7 -0
- package/dist/data/test/function/sort_merge__else_14.mcfunction +2 -0
- package/dist/data/test/function/sort_merge__else_5.mcfunction +3 -0
- package/dist/data/test/function/sort_merge__else_8.mcfunction +7 -0
- package/dist/data/test/function/sort_merge__loop_body_1.mcfunction +3 -0
- package/dist/data/test/function/sort_merge__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/sort_merge__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/sort_merge__merge_10.mcfunction +1 -0
- package/dist/data/test/function/sort_merge__merge_13.mcfunction +1 -0
- package/dist/data/test/function/sort_merge__merge_4.mcfunction +1 -0
- package/dist/data/test/function/sort_merge__merge_7.mcfunction +1 -0
- package/dist/data/test/function/sort_merge__then_12.mcfunction +7 -0
- package/dist/data/test/function/sort_merge__then_3.mcfunction +3 -0
- package/dist/data/test/function/sort_merge__then_6.mcfunction +3 -0
- package/dist/data/test/function/sort_merge__then_9.mcfunction +7 -0
- package/dist/data/test/function/sparkles_at.mcfunction +1 -0
- package/dist/data/test/function/speed.mcfunction +1 -0
- package/dist/data/test/function/sphere_contains.mcfunction +1 -2
- package/dist/data/test/function/spread_players.mcfunction +1 -0
- package/dist/data/test/function/sqrt_fx.mcfunction +5 -8
- package/dist/data/test/function/sqrt_hp.mcfunction +17 -0
- package/dist/data/test/function/sqrt_hp__merge_1.mcfunction +21 -0
- package/dist/data/test/function/sqrt_hp__then_0.mcfunction +2 -0
- package/dist/data/test/function/std_dev_approx.mcfunction +5 -0
- package/dist/data/test/function/std_dev_approx__merge_1.mcfunction +13 -0
- package/dist/data/test/function/std_dev_approx__then_0.mcfunction +2 -0
- package/dist/data/test/function/str_len.mcfunction +2 -0
- package/dist/data/test/function/strength.mcfunction +1 -0
- package/dist/data/test/function/t.mcfunction +3 -0
- package/dist/data/test/function/teleport_to.mcfunction +9 -0
- package/dist/data/test/function/teleport_to_entity.mcfunction +5 -0
- package/dist/data/test/function/test.mcfunction +5 -0
- package/dist/data/test/function/test__loop_body_1.mcfunction +9 -0
- package/dist/data/test/function/test__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/test__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/tile_of.mcfunction +1 -2
- package/dist/data/test/function/timer/done.mcfunction +1 -2
- package/dist/data/test/function/timer/remaining.mcfunction +1 -2
- package/dist/data/test/function/timer/tick.mcfunction +1 -2
- package/dist/data/test/function/timer/tick__then_0.mcfunction +1 -2
- package/dist/data/test/function/totem_at.mcfunction +1 -0
- package/dist/data/test/function/trapezoid_step.mcfunction +11 -0
- package/dist/data/test/function/uniform_frac.mcfunction +1 -2
- package/dist/data/test/function/uniform_int.mcfunction +1 -2
- package/dist/data/test/function/update_bar.mcfunction +5 -0
- package/dist/data/test/function/update_bar_color.mcfunction +6 -0
- package/dist/data/test/function/update_bar_color__else_2.mcfunction +4 -0
- package/dist/data/test/function/update_bar_color__else_5.mcfunction +4 -0
- package/dist/data/test/function/update_bar_color__merge_1.mcfunction +1 -0
- package/dist/data/test/function/update_bar_color__merge_4.mcfunction +1 -0
- package/dist/data/test/function/update_bar_color__then_0.mcfunction +4 -0
- package/dist/data/test/function/update_bar_color__then_3.mcfunction +4 -0
- package/dist/data/test/function/value_noise_1d.mcfunction +1 -2
- package/dist/data/test/function/value_noise_2d.mcfunction +1 -2
- package/dist/data/test/function/value_noise_2d__merge_1.mcfunction +1 -2
- package/dist/data/test/function/variance_from_m2.mcfunction +6 -0
- package/dist/data/test/function/variance_from_m2__merge_1.mcfunction +5 -0
- package/dist/data/test/function/variance_from_m2__then_0.mcfunction +2 -0
- package/dist/data/test/function/weapon_damage.mcfunction +5 -0
- package/dist/data/test/function/weather_clear.mcfunction +1 -0
- package/dist/data/test/function/weather_rain.mcfunction +1 -0
- package/dist/data/test/function/weather_thunder.mcfunction +1 -0
- package/dist/data/test/function/weighted2.mcfunction +1 -2
- package/dist/data/test/function/weighted2__merge_1.mcfunction +1 -2
- package/dist/data/test/function/weighted3.mcfunction +1 -2
- package/dist/data/test/function/weighted3__merge_1.mcfunction +1 -2
- package/dist/data/test/function/weighted3__merge_3.mcfunction +1 -2
- package/dist/data/test_dmul/function/__double_mul_macro.mcfunction +1 -0
- package/dist/data/test_dmul/function/double_mul_fixed.mcfunction +6 -0
- package/dist/data/test_dmul/function/load.mcfunction +1 -0
- package/dist/data/test_double_fn/function/double_test.mcfunction +2 -0
- package/dist/data/test_double_fn/function/load.mcfunction +1 -0
- package/dist/data/test_double_fn2/function/double_test.mcfunction +2 -0
- package/dist/data/test_double_fn2/function/load.mcfunction +1 -0
- package/dist/data/test_double_pass/function/caller_fn.mcfunction +4 -0
- package/dist/data/test_double_pass/function/consume_double.mcfunction +2 -0
- package/dist/data/test_double_pass/function/load.mcfunction +1 -0
- package/dist/data/test_macro/function/load.mcfunction +1 -0
- package/dist/data/test_macro/function/macro_helper.mcfunction +1 -0
- package/dist/data/test_macro3/function/__dmul_macro.mcfunction +1 -0
- package/dist/data/test_macro3/function/double_mul_test.mcfunction +7 -0
- package/dist/data/test_macro3/function/load.mcfunction +1 -0
- package/dist/data/test_ret_double/function/load.mcfunction +1 -0
- package/dist/data/test_ret_double/function/make_double.mcfunction +3 -0
- package/dist/data/test_ret_double/function/use_it.mcfunction +3 -0
- package/dist/pack.mcmeta +1 -1
- package/dist/src/__tests__/array-dynamic.test.js +42 -0
- package/dist/src/__tests__/builtins.test.d.ts +1 -0
- package/dist/src/__tests__/builtins.test.js +55 -0
- package/dist/src/__tests__/compile-all.test.js +1 -0
- package/dist/src/__tests__/diagnostics.test.js +8 -11
- package/dist/src/__tests__/double.test.d.ts +7 -0
- package/dist/src/__tests__/double.test.js +464 -0
- package/dist/src/__tests__/e2e/ecs-stdlib.test.d.ts +7 -0
- package/dist/src/__tests__/e2e/ecs-stdlib.test.js +328 -0
- package/dist/src/__tests__/e2e/events-stdlib.test.d.ts +1 -0
- package/dist/src/__tests__/e2e/events-stdlib.test.js +81 -0
- package/dist/src/__tests__/e2e/fft-stdlib.test.d.ts +13 -0
- package/dist/src/__tests__/e2e/fft-stdlib.test.js +288 -0
- package/dist/src/__tests__/e2e/for-in-array.test.d.ts +4 -0
- package/dist/src/__tests__/e2e/for-in-array.test.js +59 -0
- package/dist/src/__tests__/e2e/macros.test.js +7 -7
- package/dist/src/__tests__/e2e/ode-stdlib.test.d.ts +1 -0
- package/dist/src/__tests__/e2e/ode-stdlib.test.js +91 -0
- package/dist/src/__tests__/e2e/stdlib-e2e.test.js +1616 -0
- package/dist/src/__tests__/emit/compile.test.d.ts +1 -0
- package/dist/src/__tests__/emit/compile.test.js +95 -0
- package/dist/src/__tests__/emit/index.test.d.ts +1 -0
- package/dist/src/__tests__/emit/index.test.js +180 -0
- package/dist/src/__tests__/emit/modules-extra.test.d.ts +1 -0
- package/dist/src/__tests__/emit/modules-extra.test.js +77 -0
- package/dist/src/__tests__/enum.test.js +4 -6
- package/dist/src/__tests__/fixed.test.d.ts +7 -0
- package/dist/src/__tests__/fixed.test.js +148 -0
- package/dist/src/__tests__/float-lint.test.d.ts +7 -0
- package/dist/src/__tests__/float-lint.test.js +96 -0
- package/dist/src/__tests__/float.test.d.ts +7 -0
- package/dist/src/__tests__/float.test.js +148 -0
- package/dist/src/__tests__/for-each.test.d.ts +1 -0
- package/dist/src/__tests__/for-each.test.js +125 -0
- package/dist/src/__tests__/for-range.test.d.ts +1 -0
- package/dist/src/__tests__/for-range.test.js +136 -0
- package/dist/src/__tests__/generics.test.js +4 -4
- package/dist/src/__tests__/impl.test.d.ts +1 -0
- package/dist/src/__tests__/impl.test.js +199 -0
- package/dist/src/__tests__/lsp-logic.test.d.ts +1 -0
- package/dist/src/__tests__/lsp-logic.test.js +145 -0
- package/dist/src/__tests__/match.test.d.ts +10 -0
- package/dist/src/__tests__/match.test.js +197 -0
- package/dist/src/__tests__/mc-integration/item-entity-events.test.d.ts +18 -0
- package/dist/src/__tests__/mc-integration/item-entity-events.test.js +287 -0
- package/dist/src/__tests__/mc-integration/stdlib-coverage-2.test.d.ts +13 -0
- package/dist/src/__tests__/mc-integration/stdlib-coverage-2.test.js +833 -0
- package/dist/src/__tests__/mc-integration/stdlib-coverage.test.d.ts +13 -0
- package/dist/src/__tests__/mc-integration/stdlib-coverage.test.js +707 -0
- package/dist/src/__tests__/mc-integration/syntax-coverage.test.d.ts +9 -0
- package/dist/src/__tests__/mc-integration/syntax-coverage.test.js +442 -0
- package/dist/src/__tests__/mc-integration.test.js +835 -5
- package/dist/src/__tests__/optimizer/constant_fold.test.js +105 -0
- package/dist/src/__tests__/optimizer/coroutine.test.js +3 -2
- package/dist/src/__tests__/parser.test.js +5 -5
- package/dist/src/__tests__/runtime.test.js +143 -238
- package/dist/src/__tests__/stdlib/arr-len.test.d.ts +13 -0
- package/dist/src/__tests__/stdlib/arr-len.test.js +195 -0
- package/dist/src/__tests__/stdlib/calculus.test.d.ts +5 -0
- package/dist/src/__tests__/stdlib/calculus.test.js +123 -0
- package/dist/src/__tests__/stdlib/dialog.test.d.ts +6 -0
- package/dist/src/__tests__/stdlib/dialog.test.js +142 -0
- package/dist/src/__tests__/stdlib/easing.test.d.ts +5 -0
- package/dist/src/__tests__/stdlib/easing.test.js +117 -0
- package/dist/src/__tests__/stdlib/geometry.test.d.ts +5 -0
- package/dist/src/__tests__/stdlib/geometry.test.js +163 -0
- package/dist/src/__tests__/stdlib/heap.test.d.ts +4 -0
- package/dist/src/__tests__/stdlib/heap.test.js +141 -0
- package/dist/src/__tests__/stdlib/list.test.d.ts +5 -0
- package/dist/src/__tests__/stdlib/list.test.js +134 -0
- package/dist/src/__tests__/stdlib/matrix.test.d.ts +5 -0
- package/dist/src/__tests__/stdlib/matrix.test.js +148 -0
- package/dist/src/__tests__/stdlib/pathfind.test.d.ts +4 -0
- package/dist/src/__tests__/stdlib/pathfind.test.js +167 -0
- package/dist/src/__tests__/stdlib/scheduler.test.d.ts +6 -0
- package/dist/src/__tests__/stdlib/scheduler.test.js +177 -0
- package/dist/src/__tests__/stdlib/sort-v2.test.d.ts +4 -0
- package/dist/src/__tests__/stdlib/sort-v2.test.js +131 -0
- package/dist/src/__tests__/stdlib/sort.test.d.ts +4 -0
- package/dist/src/__tests__/stdlib/sort.test.js +128 -0
- package/dist/src/__tests__/stdlib/state.test.d.ts +5 -0
- package/dist/src/__tests__/stdlib/state.test.js +176 -0
- package/dist/src/__tests__/typechecker-strict.test.js +21 -21
- package/dist/src/__tests__/typechecker.test.js +5 -3
- package/dist/src/ast/types.d.ts +28 -2
- package/dist/src/emit/compile.js +30 -3
- package/dist/src/emit/index.d.ts +2 -0
- package/dist/src/emit/index.js +20 -1
- package/dist/src/emit/modules.js +3 -2
- package/dist/src/events/types.d.ts +1 -1
- package/dist/src/events/types.js +5 -2
- package/dist/src/hir/lower.js +88 -2
- package/dist/src/hir/monomorphize.js +11 -5
- package/dist/src/hir/types.d.ts +20 -1
- package/dist/src/lexer/index.d.ts +1 -1
- package/dist/src/lexer/index.js +10 -1
- package/dist/src/lir/lower.js +7 -0
- package/dist/src/lsp/server.js +912 -56
- package/dist/src/mc-test/client.d.ts +13 -1
- package/dist/src/mc-test/client.js +29 -1
- package/dist/src/mir/lower.js +703 -74
- package/dist/src/mir/types.d.ts +5 -0
- package/dist/src/mir/verify.js +2 -0
- package/dist/src/optimizer/constant_fold.js +10 -6
- package/dist/src/optimizer/coroutine.js +90 -33
- package/dist/src/optimizer/interprocedural.js +4 -0
- package/dist/src/parser/index.d.ts +5 -0
- package/dist/src/parser/index.js +171 -39
- package/dist/src/runtime/index.js +24 -0
- package/dist/src/typechecker/index.d.ts +8 -1
- package/dist/src/typechecker/index.js +73 -14
- package/docs/LANGUAGE_REFERENCE.md +302 -67
- package/docs/stdlib/README.md +54 -0
- package/docs/stdlib/advanced.md +276 -0
- package/docs/stdlib/bigint.md +285 -0
- package/docs/stdlib/bits.md +159 -0
- package/docs/stdlib/bossbar.md +101 -0
- package/docs/stdlib/calculus.md +141 -0
- package/docs/stdlib/color.md +125 -0
- package/docs/stdlib/combat.md +41 -0
- package/docs/stdlib/cooldown.md +48 -0
- package/docs/stdlib/easing.md +157 -0
- package/docs/stdlib/effects.md +101 -0
- package/docs/stdlib/expr.md +38 -0
- package/docs/stdlib/geometry.md +130 -0
- package/docs/stdlib/interactions.md +111 -0
- package/docs/stdlib/inventory.md +53 -0
- package/docs/stdlib/list.md +189 -0
- package/docs/stdlib/math.md +334 -0
- package/docs/stdlib/math_hp.md +185 -0
- package/docs/stdlib/matrix.md +123 -0
- package/docs/stdlib/mobs.md +131 -0
- package/docs/stdlib/noise.md +103 -0
- package/docs/stdlib/parabola.md +119 -0
- package/docs/stdlib/particles.md +123 -0
- package/docs/stdlib/physics.md +148 -0
- package/docs/stdlib/player.md +43 -0
- package/docs/stdlib/quaternion.md +159 -0
- package/docs/stdlib/random.md +86 -0
- package/docs/stdlib/sets.md +68 -0
- package/docs/stdlib/signal.md +141 -0
- package/docs/stdlib/spawn.md +65 -0
- package/docs/stdlib/strings.md +17 -0
- package/docs/stdlib/tags.md +117 -0
- package/docs/stdlib/teams.md +87 -0
- package/docs/stdlib/timer.md +126 -0
- package/docs/stdlib/vec.md +193 -0
- package/docs/stdlib/world.md +151 -0
- package/editors/vscode/build.mjs +31 -12
- package/editors/vscode/out/extension.js +3670 -200
- package/editors/vscode/out/lsp-server.js +14854 -0
- package/editors/vscode/package-lock.json +3 -3
- package/editors/vscode/package.json +1 -1
- package/editors/vscode/snippets/redscript.json +109 -30
- package/editors/vscode/src/extension.ts +15 -13
- package/examples/readme-demo.mcrs +4 -4
- package/jest.config.js +5 -2
- package/package.json +1 -1
- package/scripts/postbuild.js +20 -0
- package/src/__tests__/array-dynamic.test.ts +42 -0
- package/src/__tests__/builtins.test.ts +66 -0
- package/src/__tests__/compile-all.test.ts +3 -2
- package/src/__tests__/diagnostics.test.ts +8 -10
- package/src/__tests__/double.test.ts +478 -0
- package/src/__tests__/e2e/ecs-stdlib.test.ts +371 -0
- package/src/__tests__/e2e/events-stdlib.test.ts +50 -0
- package/src/__tests__/e2e/fft-stdlib.test.ts +313 -0
- package/src/__tests__/e2e/macros.test.ts +7 -7
- package/src/__tests__/e2e/ode-stdlib.test.ts +68 -0
- package/src/__tests__/e2e/stdlib-e2e.test.ts +1952 -0
- package/src/__tests__/emit/compile.test.ts +102 -0
- package/src/__tests__/emit/index.test.ts +189 -0
- package/src/__tests__/emit/modules-extra.test.ts +80 -0
- package/src/__tests__/enum.test.ts +4 -6
- package/src/__tests__/fixed.test.ts +159 -0
- package/src/__tests__/fixtures/coroutine-mc-test.mcrs +58 -0
- package/src/__tests__/fixtures/for-range.mcrs +15 -0
- package/src/__tests__/fixtures/heap-sort-mc-test.mcrs +87 -0
- package/src/__tests__/fixtures/impl-test.mcrs +13 -44
- package/src/__tests__/fixtures/stdlib-extra-test.mcrs +226 -0
- package/src/__tests__/fixtures/stdlib-math-integration.mcrs +28 -0
- package/src/__tests__/fixtures/stdlib-math-test.mcrs +53 -0
- package/src/__tests__/float-lint.test.ts +102 -0
- package/src/__tests__/float.test.ts +158 -0
- package/src/__tests__/for-each.test.ts +135 -0
- package/src/__tests__/for-range.test.ts +149 -0
- package/src/__tests__/generics.test.ts +4 -4
- package/src/__tests__/impl.test.ts +207 -0
- package/src/__tests__/lsp-logic.test.ts +162 -0
- package/src/__tests__/match.test.ts +212 -0
- package/src/__tests__/mc-integration/item-entity-events.test.ts +298 -0
- package/src/__tests__/mc-integration/stdlib-coverage-2.test.ts +817 -0
- package/src/__tests__/mc-integration/stdlib-coverage.test.ts +699 -0
- package/src/__tests__/mc-integration/syntax-coverage.test.ts +464 -0
- package/src/__tests__/mc-integration.test.ts +889 -5
- package/src/__tests__/optimizer/constant_fold.test.ts +115 -0
- package/src/__tests__/optimizer/coroutine.test.ts +3 -2
- package/src/__tests__/parser.test.ts +5 -5
- package/src/__tests__/runtime.test.ts +194 -0
- package/src/__tests__/stdlib/arr-len.test.ts +231 -0
- package/src/__tests__/stdlib/calculus.test.ts +99 -0
- package/src/__tests__/stdlib/dialog.test.ts +132 -0
- package/src/__tests__/stdlib/easing.test.ts +97 -0
- package/src/__tests__/stdlib/geometry.test.ts +171 -0
- package/src/__tests__/stdlib/heap.test.ts +121 -0
- package/src/__tests__/stdlib/list.test.ts +117 -0
- package/src/__tests__/stdlib/matrix.test.ts +140 -0
- package/src/__tests__/stdlib/pathfind.test.ts +151 -0
- package/src/__tests__/stdlib/scheduler.test.ts +171 -0
- package/src/__tests__/stdlib/sort-v2.test.ts +111 -0
- package/src/__tests__/stdlib/sort.test.ts +106 -0
- package/src/__tests__/stdlib/state.test.ts +164 -0
- package/src/__tests__/typechecker-strict.test.ts +21 -21
- package/src/__tests__/typechecker.test.ts +5 -3
- package/src/ast/types.ts +16 -3
- package/src/emit/compile.ts +32 -3
- package/src/emit/index.ts +24 -1
- package/src/emit/modules.ts +2 -1
- package/src/events/types.ts +5 -2
- package/src/examples/capture_the_flag.mcrs +2 -2
- package/src/examples/hunger_games.mcrs +4 -4
- package/src/examples/parkour_race.mcrs +8 -8
- package/src/examples/tutorial_01_hello.mcrs +63 -0
- package/src/examples/tutorial_02_variables.mcrs +157 -0
- package/src/examples/tutorial_03_functions_structs.mcrs +162 -0
- package/src/examples/tutorial_04_selectors.mcrs +139 -0
- package/src/examples/tutorial_05_decorators.mcrs +131 -0
- package/src/examples/tutorial_06_math_particles.mcrs +123 -0
- package/src/examples/tutorial_07_random.mcrs +142 -0
- package/src/examples/tutorial_08_coroutine.mcrs +163 -0
- package/src/examples/tutorial_09_precision.mcrs +154 -0
- package/src/examples/tutorial_10_kill_race.mcrs +289 -0
- package/src/examples/zombie_survival.mcrs +7 -7
- package/src/hir/lower.ts +101 -4
- package/src/hir/monomorphize.ts +11 -6
- package/src/hir/types.ts +14 -1
- package/src/lexer/index.ts +11 -2
- package/src/lir/lower.ts +8 -0
- package/src/lsp/server.ts +894 -54
- package/src/mc-test/client.ts +32 -1
- package/src/mir/lower.ts +703 -74
- package/src/mir/types.ts +1 -0
- package/src/mir/verify.ts +2 -0
- package/src/optimizer/constant_fold.ts +11 -6
- package/src/optimizer/coroutine.ts +89 -29
- package/src/optimizer/interprocedural.ts +4 -0
- package/src/parser/index.ts +175 -41
- package/src/runtime/index.ts +26 -0
- package/src/stdlib/advanced.mcrs +47 -0
- package/src/stdlib/bigint.mcrs +251 -0
- package/src/stdlib/calculus.mcrs +150 -0
- package/src/stdlib/color.mcrs +102 -82
- package/src/stdlib/combat.mcrs +18 -12
- package/src/stdlib/dialog.mcrs +55 -0
- package/src/stdlib/ecs.mcrs +238 -0
- package/src/stdlib/events.mcrs +29 -0
- package/src/stdlib/expr.mcrs +117 -0
- package/src/stdlib/fft.mcrs +177 -0
- package/src/stdlib/geometry.mcrs +89 -0
- package/src/stdlib/graph.mcrs +274 -0
- package/src/stdlib/heap.mcrs +175 -0
- package/src/stdlib/linalg.mcrs +260 -0
- package/src/stdlib/list.mcrs +99 -0
- package/src/stdlib/math.mcrs +121 -5
- package/src/stdlib/math_hp.mcrs +452 -0
- package/src/stdlib/matrix.mcrs +113 -0
- package/src/stdlib/ode.mcrs +168 -0
- package/src/stdlib/parabola.mcrs +160 -0
- package/src/stdlib/particles.mcrs +69 -0
- package/src/stdlib/pathfind.mcrs +321 -0
- package/src/stdlib/quaternion.mcrs +192 -0
- package/src/stdlib/random.mcrs +46 -1
- package/src/stdlib/scheduler.mcrs +271 -0
- package/src/stdlib/signal.mcrs +223 -0
- package/src/stdlib/sort.mcrs +194 -0
- package/src/stdlib/state.mcrs +65 -0
- package/src/stdlib/world.mcrs +24 -0
- package/src/typechecker/index.ts +88 -15
- package/test_trig.ts +43 -0
|
@@ -0,0 +1,833 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* RedScript MC Integration Tests — stdlib coverage 2
|
|
4
|
+
*
|
|
5
|
+
* Tests calculus / matrix / signal stdlib modules against a real Paper 1.21.4
|
|
6
|
+
* server with TestHarnessPlugin.
|
|
7
|
+
*
|
|
8
|
+
* Prerequisites:
|
|
9
|
+
* - Paper server running with TestHarnessPlugin on port 25561
|
|
10
|
+
* - MC_SERVER_DIR env var pointing to server directory
|
|
11
|
+
*
|
|
12
|
+
* Run: MC_SERVER_DIR=~/mc-test-server npx jest stdlib-coverage-2 --testTimeout=120000
|
|
13
|
+
*/
|
|
14
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
15
|
+
if (k2 === undefined) k2 = k;
|
|
16
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
17
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
18
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
19
|
+
}
|
|
20
|
+
Object.defineProperty(o, k2, desc);
|
|
21
|
+
}) : (function(o, m, k, k2) {
|
|
22
|
+
if (k2 === undefined) k2 = k;
|
|
23
|
+
o[k2] = m[k];
|
|
24
|
+
}));
|
|
25
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
26
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
27
|
+
}) : function(o, v) {
|
|
28
|
+
o["default"] = v;
|
|
29
|
+
});
|
|
30
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
31
|
+
var ownKeys = function(o) {
|
|
32
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
33
|
+
var ar = [];
|
|
34
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
35
|
+
return ar;
|
|
36
|
+
};
|
|
37
|
+
return ownKeys(o);
|
|
38
|
+
};
|
|
39
|
+
return function (mod) {
|
|
40
|
+
if (mod && mod.__esModule) return mod;
|
|
41
|
+
var result = {};
|
|
42
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
43
|
+
__setModuleDefault(result, mod);
|
|
44
|
+
return result;
|
|
45
|
+
};
|
|
46
|
+
})();
|
|
47
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
+
const fs = __importStar(require("fs"));
|
|
49
|
+
const path = __importStar(require("path"));
|
|
50
|
+
const compile_1 = require("../../compile");
|
|
51
|
+
const client_1 = require("../../mc-test/client");
|
|
52
|
+
const MC_HOST = process.env.MC_HOST ?? 'localhost';
|
|
53
|
+
const MC_PORT = parseInt(process.env.MC_PORT ?? '25561');
|
|
54
|
+
const MC_SERVER_DIR = process.env.MC_SERVER_DIR ?? path.join(process.env.HOME, 'mc-test-server');
|
|
55
|
+
const DATAPACK_DIR = path.join(MC_SERVER_DIR, 'world', 'datapacks', 'redscript-test2');
|
|
56
|
+
const STDLIB_DIR = path.join(__dirname, '../../stdlib');
|
|
57
|
+
let serverOnline = false;
|
|
58
|
+
let mc;
|
|
59
|
+
// ---------------------------------------------------------------------------
|
|
60
|
+
// Helper: compile and deploy a RedScript snippet with optional stdlib libs
|
|
61
|
+
// ---------------------------------------------------------------------------
|
|
62
|
+
function writeFixture(source, namespace, librarySources = []) {
|
|
63
|
+
fs.mkdirSync(DATAPACK_DIR, { recursive: true });
|
|
64
|
+
if (!fs.existsSync(path.join(DATAPACK_DIR, 'pack.mcmeta'))) {
|
|
65
|
+
fs.writeFileSync(path.join(DATAPACK_DIR, 'pack.mcmeta'), JSON.stringify({ pack: { pack_format: 48, description: 'RedScript integration tests 2' } }));
|
|
66
|
+
}
|
|
67
|
+
const result = (0, compile_1.compile)(source, { namespace, librarySources });
|
|
68
|
+
for (const file of result.files) {
|
|
69
|
+
if (file.path === 'pack.mcmeta')
|
|
70
|
+
continue;
|
|
71
|
+
const filePath = path.join(DATAPACK_DIR, file.path);
|
|
72
|
+
fs.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
73
|
+
// Merge minecraft tag files (tick.json / load.json) instead of overwriting
|
|
74
|
+
if (file.path.includes('data/minecraft/tags/') && fs.existsSync(filePath)) {
|
|
75
|
+
const existing = JSON.parse(fs.readFileSync(filePath, 'utf-8'));
|
|
76
|
+
const incoming = JSON.parse(file.content);
|
|
77
|
+
const merged = { values: [...new Set([...(existing.values ?? []), ...(incoming.values ?? [])])] };
|
|
78
|
+
fs.writeFileSync(filePath, JSON.stringify(merged, null, 2));
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
fs.writeFileSync(filePath, file.content);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
function readStdlib(name) {
|
|
86
|
+
return fs.readFileSync(path.join(STDLIB_DIR, name), 'utf-8');
|
|
87
|
+
}
|
|
88
|
+
// ---------------------------------------------------------------------------
|
|
89
|
+
// Setup
|
|
90
|
+
// ---------------------------------------------------------------------------
|
|
91
|
+
beforeAll(async () => {
|
|
92
|
+
mc = new client_1.MCTestClient(MC_HOST, MC_PORT);
|
|
93
|
+
try {
|
|
94
|
+
const deadline = Date.now() + 10_000;
|
|
95
|
+
while (Date.now() < deadline) {
|
|
96
|
+
if (await mc.isOnline()) {
|
|
97
|
+
serverOnline = true;
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
await new Promise(r => setTimeout(r, 1000));
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
catch {
|
|
104
|
+
serverOnline = false;
|
|
105
|
+
}
|
|
106
|
+
if (!serverOnline) {
|
|
107
|
+
console.warn(`⚠ MC server not running at ${MC_HOST}:${MC_PORT} — skipping stdlib-coverage-2 tests`);
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
// Clear stale minecraft tag files before writing fixtures
|
|
111
|
+
for (const tagFile of [
|
|
112
|
+
'data/minecraft/tags/function/tick.json',
|
|
113
|
+
'data/minecraft/tags/function/load.json',
|
|
114
|
+
'data/minecraft/tags/functions/tick.json',
|
|
115
|
+
'data/minecraft/tags/functions/load.json',
|
|
116
|
+
]) {
|
|
117
|
+
const p = path.join(DATAPACK_DIR, tagFile);
|
|
118
|
+
if (fs.existsSync(p))
|
|
119
|
+
fs.writeFileSync(p, JSON.stringify({ values: [] }, null, 2));
|
|
120
|
+
}
|
|
121
|
+
// Ensure result objective exists
|
|
122
|
+
await mc.command('/scoreboard objectives add stdlib2_result dummy').catch(() => { });
|
|
123
|
+
const MATH_SRC = readStdlib('math.mcrs');
|
|
124
|
+
const CALCULUS_SRC = readStdlib('calculus.mcrs');
|
|
125
|
+
const MATRIX_SRC = readStdlib('matrix.mcrs');
|
|
126
|
+
const SIGNAL_SRC = readStdlib('signal.mcrs');
|
|
127
|
+
// ── calculus module fixtures ──────────────────────────────────────────────
|
|
128
|
+
writeFixture(`
|
|
129
|
+
namespace stdlib_calculus_test
|
|
130
|
+
|
|
131
|
+
fn test_deriv_forward() {
|
|
132
|
+
// f(x+h)=20000, f(x)=10000, h=10000 → derivative = (20000-10000)*10000/10000 = 10000
|
|
133
|
+
let r: int = deriv_forward(20000, 10000, 10000);
|
|
134
|
+
scoreboard_set("#calc_deriv_fwd", #stdlib2_result, r);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
fn test_deriv_central() {
|
|
138
|
+
// f(x+h)=30000, f(x-h)=10000, h=10000 → (30000-10000)*10000/(2*10000) = 10000
|
|
139
|
+
let r: int = deriv_central(30000, 10000, 10000);
|
|
140
|
+
scoreboard_set("#calc_deriv_cen", #stdlib2_result, r);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
fn test_deriv_central_linear() {
|
|
144
|
+
// For f(x) = 2x (slope = 2), f(x+h)=12000, f(x-h)=8000, h=1000
|
|
145
|
+
// central diff = (12000-8000)*10000/(2*1000) = 40000000/2000 = 20000 (= 2.0 ×10000)
|
|
146
|
+
let r: int = deriv_central(12000, 8000, 1000);
|
|
147
|
+
scoreboard_set("#calc_deriv_linear", #stdlib2_result, r);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
fn test_integrate_trapezoid() {
|
|
151
|
+
// 3 points [0, 5000, 10000] with h=10000 (step = 1.0)
|
|
152
|
+
// Trapezoid: sum = 0/2 + 10000/2 + 5000 = 10000; result = 10000*10000/10000 = 10000
|
|
153
|
+
let vals: int[] = [0, 5000, 10000];
|
|
154
|
+
let r: int = integrate_trapezoid(vals, 3, 10000);
|
|
155
|
+
scoreboard_set("#calc_trap", #stdlib2_result, r);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
fn test_integrate_trapezoid_constant() {
|
|
159
|
+
// Constant function f=10000 over [0, 2] with h=10000, n=3
|
|
160
|
+
// sum = 10000/2 + 10000/2 + 10000 = 20000; result = 20000*10000/10000 = 20000
|
|
161
|
+
let vals: int[] = [10000, 10000, 10000];
|
|
162
|
+
let r: int = integrate_trapezoid(vals, 3, 10000);
|
|
163
|
+
scoreboard_set("#calc_trap_const", #stdlib2_result, r);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
fn test_integrate_simpson() {
|
|
167
|
+
// Simpson on linear [0, 5000, 10000], h=10000, n=3
|
|
168
|
+
// sum = 0 + 10000 + 4*5000 = 30000; result = 30000*10000/30000 = 10000
|
|
169
|
+
let vals: int[] = [0, 5000, 10000];
|
|
170
|
+
let r: int = integrate_simpson(vals, 3, 10000);
|
|
171
|
+
scoreboard_set("#calc_simp", #stdlib2_result, r);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
fn test_running_mean_first() {
|
|
175
|
+
// First sample: n=1 → returns new_val directly
|
|
176
|
+
let r: int = running_mean(0, 20000, 1);
|
|
177
|
+
scoreboard_set("#calc_mean1", #stdlib2_result, r);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
fn test_running_mean_second() {
|
|
181
|
+
// Second sample: prev_mean=20000, new_val=40000, n=2
|
|
182
|
+
// = 20000 + (40000-20000)*10000/(2*10000) = 20000 + 10000 = 30000
|
|
183
|
+
let r: int = running_mean(20000, 40000, 2);
|
|
184
|
+
scoreboard_set("#calc_mean2", #stdlib2_result, r);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
fn test_running_m2() {
|
|
188
|
+
// Welford M2 update: prev_m2=0, prev_mean=20000, new_mean=30000, new_val=40000
|
|
189
|
+
// = 0 + (40000-20000)*(40000-30000)/10000 = 20000*10000/10000 = 20000
|
|
190
|
+
let r: int = running_m2(0, 20000, 30000, 40000);
|
|
191
|
+
scoreboard_set("#calc_m2", #stdlib2_result, r);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
fn test_variance_from_m2() {
|
|
195
|
+
// variance_from_m2(20000, 2) = 20000 / (2-1) = 20000
|
|
196
|
+
let r: int = variance_from_m2(20000, 2);
|
|
197
|
+
scoreboard_set("#calc_var", #stdlib2_result, r);
|
|
198
|
+
}
|
|
199
|
+
`, 'stdlib_calculus_test', [MATH_SRC, CALCULUS_SRC]);
|
|
200
|
+
// ── matrix module fixtures ────────────────────────────────────────────────
|
|
201
|
+
writeFixture(`
|
|
202
|
+
namespace stdlib_matrix_test
|
|
203
|
+
|
|
204
|
+
fn test_scale_x() {
|
|
205
|
+
// scale_x(30000, 20000) = 30000*20000/10000 = 60000 (3.0 × 2.0 = 6.0 ×10000)
|
|
206
|
+
let r: int = scale_x(30000, 20000);
|
|
207
|
+
scoreboard_set("#mat_scale_x", #stdlib2_result, r);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
fn test_uniform_scale() {
|
|
211
|
+
// uniform_scale(15000, 30000) = 15000*30000/10000 = 45000
|
|
212
|
+
let r: int = uniform_scale(15000, 30000);
|
|
213
|
+
scoreboard_set("#mat_unif_scale", #stdlib2_result, r);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
fn test_billboard_y() {
|
|
217
|
+
// billboard_y(900000) = (900000+1800000)%3600000 = 2700000
|
|
218
|
+
let r: int = billboard_y(900000);
|
|
219
|
+
scoreboard_set("#mat_billboard", #stdlib2_result, r);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
fn test_billboard_y_wrap() {
|
|
223
|
+
// billboard_y(3000000) = (3000000+1800000)%3600000 = 4800000%3600000 = 1200000
|
|
224
|
+
let r: int = billboard_y(3000000);
|
|
225
|
+
scoreboard_set("#mat_billboard_wrap", #stdlib2_result, r);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
fn test_lerp_angle_half() {
|
|
229
|
+
// lerp_angle(0, 10000, 5000) = 0 + 10000*5000/10000 = 5000
|
|
230
|
+
let r: int = lerp_angle(0, 10000, 5000);
|
|
231
|
+
scoreboard_set("#mat_lerp_half", #stdlib2_result, r);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
fn test_lerp_angle_full() {
|
|
235
|
+
// lerp_angle(0, 10000, 10000) = 0 + 10000*10000/10000 = 10000
|
|
236
|
+
let r: int = lerp_angle(0, 10000, 10000);
|
|
237
|
+
scoreboard_set("#mat_lerp_full", #stdlib2_result, r);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
fn test_mat3_identity_elem() {
|
|
241
|
+
// Identity matrix × Identity matrix: element [0][0] should be 10000 (= 1.0 ×10000)
|
|
242
|
+
// I = [[10000,0,0],[0,10000,0],[0,0,10000]]
|
|
243
|
+
let r: int = mat3_mul_elem(
|
|
244
|
+
10000, 0, 0,
|
|
245
|
+
0, 10000, 0,
|
|
246
|
+
0, 0, 10000,
|
|
247
|
+
10000, 0, 0,
|
|
248
|
+
0, 10000, 0,
|
|
249
|
+
0, 0, 10000,
|
|
250
|
+
0, 0
|
|
251
|
+
);
|
|
252
|
+
scoreboard_set("#mat3_id_00", #stdlib2_result, r);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
fn test_mat3_identity_off_diag() {
|
|
256
|
+
// Identity × Identity: element [0][1] should be 0
|
|
257
|
+
let r: int = mat3_mul_elem(
|
|
258
|
+
10000, 0, 0,
|
|
259
|
+
0, 10000, 0,
|
|
260
|
+
0, 0, 10000,
|
|
261
|
+
10000, 0, 0,
|
|
262
|
+
0, 10000, 0,
|
|
263
|
+
0, 0, 10000,
|
|
264
|
+
0, 1
|
|
265
|
+
);
|
|
266
|
+
scoreboard_set("#mat3_id_01", #stdlib2_result, r);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
fn test_mat3_mul_vec3() {
|
|
270
|
+
// Scale matrix (2×,3×,4×) × vector (10000, 20000, 30000)
|
|
271
|
+
// x component = 2.0*10000 = 20000
|
|
272
|
+
let r: int = mat3_mul_vec3_elem(
|
|
273
|
+
20000, 0, 0,
|
|
274
|
+
0, 30000, 0,
|
|
275
|
+
0, 0, 40000,
|
|
276
|
+
10000, 20000, 30000,
|
|
277
|
+
0
|
|
278
|
+
);
|
|
279
|
+
scoreboard_set("#mat3_vec_x", #stdlib2_result, r);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
fn test_mat3_mul_vec3_y() {
|
|
283
|
+
// y component = 3.0*20000 = 60000
|
|
284
|
+
let r: int = mat3_mul_vec3_elem(
|
|
285
|
+
20000, 0, 0,
|
|
286
|
+
0, 30000, 0,
|
|
287
|
+
0, 0, 40000,
|
|
288
|
+
10000, 20000, 30000,
|
|
289
|
+
1
|
|
290
|
+
);
|
|
291
|
+
scoreboard_set("#mat3_vec_y", #stdlib2_result, r);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
fn test_rotate2d_identity() {
|
|
295
|
+
// rotate2d_x(10000, 0, 0) — rotate by 0 degrees: cos0=1000, sin0=0
|
|
296
|
+
// x' = x*cos/1000 - y*sin/1000 = 10000*1000/1000 - 0 = 10000
|
|
297
|
+
let r: int = rotate2d_x(10000, 0, 0);
|
|
298
|
+
scoreboard_set("#mat_rot2d_id", #stdlib2_result, r);
|
|
299
|
+
}
|
|
300
|
+
`, 'stdlib_matrix_test', [MATH_SRC, MATRIX_SRC]);
|
|
301
|
+
// ── signal module fixtures ────────────────────────────────────────────────
|
|
302
|
+
writeFixture(`
|
|
303
|
+
namespace stdlib_signal_test
|
|
304
|
+
|
|
305
|
+
fn test_bernoulli_certain() {
|
|
306
|
+
// p_fx=10000 (100%) — r%10000 is always in [0,9999] < 10000 → always 1
|
|
307
|
+
let r: int = bernoulli(42, 10000);
|
|
308
|
+
scoreboard_set("#sig_bern_1", #stdlib2_result, r);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
fn test_bernoulli_impossible() {
|
|
312
|
+
// p_fx=0 (0%) — r%10000 >= 0 is never < 0 → always 0
|
|
313
|
+
let r: int = bernoulli(42, 0);
|
|
314
|
+
scoreboard_set("#sig_bern_0", #stdlib2_result, r);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
fn test_weighted2_all_first() {
|
|
318
|
+
// w0=100, w1=0, total=100 → r%100 always < 100 = w0 → always 0
|
|
319
|
+
let r: int = weighted2(42, 100, 0);
|
|
320
|
+
scoreboard_set("#sig_w2_first", #stdlib2_result, r);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
fn test_weighted2_all_second() {
|
|
324
|
+
// w0=0, w1=100, total=100 → r%100 is never < 0 = w0 → always 1
|
|
325
|
+
let r: int = weighted2(42, 0, 100);
|
|
326
|
+
scoreboard_set("#sig_w2_second", #stdlib2_result, r);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
fn test_weighted3_all_first() {
|
|
330
|
+
// w0=100, w1=0, w2=0, total=100 → v = r%100 < 100 = w0 → always 0
|
|
331
|
+
let r: int = weighted3(42, 100, 0, 0);
|
|
332
|
+
scoreboard_set("#sig_w3_first", #stdlib2_result, r);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
fn test_weighted3_all_last() {
|
|
336
|
+
// w0=0, w1=0, w2=100, total=100 → v never < 0 or < 0 → always 2
|
|
337
|
+
let r: int = weighted3(42, 0, 0, 100);
|
|
338
|
+
scoreboard_set("#sig_w3_last", #stdlib2_result, r);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
fn test_uniform_frac_range() {
|
|
342
|
+
// uniform_frac result must be in [0, 10000]
|
|
343
|
+
let r: int = uniform_frac(99999);
|
|
344
|
+
scoreboard_set("#sig_ufrac", #stdlib2_result, r);
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
fn test_uniform_int_range() {
|
|
348
|
+
// uniform_int(seed, 5, 10): result must be in [5, 10]
|
|
349
|
+
let r: int = uniform_int(12345, 5, 10);
|
|
350
|
+
scoreboard_set("#sig_uint", #stdlib2_result, r);
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
fn test_normal_approx_range() {
|
|
354
|
+
// normal_approx12 range ≈ [-60000, 60000]; just verify it runs and is bounded
|
|
355
|
+
let r: int = normal_approx12(42);
|
|
356
|
+
scoreboard_set("#sig_normal", #stdlib2_result, r);
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
fn test_sin45_known() {
|
|
360
|
+
// _sin45(2) = 10000 (sin(90°))
|
|
361
|
+
let r: int = _sin45(2);
|
|
362
|
+
scoreboard_set("#sig_sin45_2", #stdlib2_result, r);
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
fn test_sin45_zero() {
|
|
366
|
+
// _sin45(0) = 0 (sin(0°))
|
|
367
|
+
let r: int = _sin45(0);
|
|
368
|
+
scoreboard_set("#sig_sin45_0", #stdlib2_result, r);
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
fn test_cos45_identity() {
|
|
372
|
+
// _cos45(0) = _sin45(2) = 10000 (cos(0°) = 1.0)
|
|
373
|
+
let r: int = _cos45(0);
|
|
374
|
+
scoreboard_set("#sig_cos45_0", #stdlib2_result, r);
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
fn test_dft_dc_bin() {
|
|
378
|
+
// DFT bin k=0 (DC) of [10000, 10000, 10000, 10000] with n=4
|
|
379
|
+
// real[0] = (s0+s1+s2+s3)/4 = 40000/4 = 10000
|
|
380
|
+
let r: int = dft_real(10000, 10000, 10000, 10000, 0, 0, 0, 0, 4, 0);
|
|
381
|
+
scoreboard_set("#sig_dft_dc", #stdlib2_result, r);
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
fn test_dft_imag_dc() {
|
|
385
|
+
// imag[0] = -(s0*sin(0)+...) / n. sin(0)=0 for all j at k=0 → 0
|
|
386
|
+
let r: int = dft_imag(10000, 10000, 10000, 10000, 0, 0, 0, 0, 4, 0);
|
|
387
|
+
scoreboard_set("#sig_dft_imag_dc", #stdlib2_result, r);
|
|
388
|
+
}
|
|
389
|
+
`, 'stdlib_signal_test', [MATH_SRC, SIGNAL_SRC]);
|
|
390
|
+
await mc.reload();
|
|
391
|
+
await mc.ticks(20);
|
|
392
|
+
console.log(' stdlib-coverage-2 setup complete.');
|
|
393
|
+
}, 60_000);
|
|
394
|
+
// ---------------------------------------------------------------------------
|
|
395
|
+
// calculus.mcrs
|
|
396
|
+
// ---------------------------------------------------------------------------
|
|
397
|
+
describe('MC Integration — stdlib: calculus.mcrs', () => {
|
|
398
|
+
test('deriv_forward(20000, 10000, 10000) == 10000 (slope = 1.0 ×10000)', async () => {
|
|
399
|
+
if (!serverOnline) {
|
|
400
|
+
console.warn(' SKIP: server offline');
|
|
401
|
+
return;
|
|
402
|
+
}
|
|
403
|
+
await mc.command('/scoreboard players set "#calc_deriv_fwd" stdlib2_result -1');
|
|
404
|
+
await mc.command('/function stdlib_calculus_test:test_deriv_forward');
|
|
405
|
+
await mc.ticks(3);
|
|
406
|
+
const result = await mc.scoreboard('#calc_deriv_fwd', 'stdlib2_result');
|
|
407
|
+
expect(result).toBe(10000);
|
|
408
|
+
console.log(` deriv_forward = ${result} ✓`);
|
|
409
|
+
}, 30_000);
|
|
410
|
+
test('deriv_central(30000, 10000, 10000) == 10000 (slope = 1.0)', async () => {
|
|
411
|
+
if (!serverOnline) {
|
|
412
|
+
console.warn(' SKIP: server offline');
|
|
413
|
+
return;
|
|
414
|
+
}
|
|
415
|
+
await mc.command('/scoreboard players set "#calc_deriv_cen" stdlib2_result -1');
|
|
416
|
+
await mc.command('/function stdlib_calculus_test:test_deriv_central');
|
|
417
|
+
await mc.ticks(3);
|
|
418
|
+
const result = await mc.scoreboard('#calc_deriv_cen', 'stdlib2_result');
|
|
419
|
+
expect(result).toBe(10000);
|
|
420
|
+
console.log(` deriv_central = ${result} ✓`);
|
|
421
|
+
}, 30_000);
|
|
422
|
+
test('deriv_central on f=2x: (12000-8000)*10000/(2*1000) == 20000', async () => {
|
|
423
|
+
if (!serverOnline) {
|
|
424
|
+
console.warn(' SKIP: server offline');
|
|
425
|
+
return;
|
|
426
|
+
}
|
|
427
|
+
await mc.command('/scoreboard players set "#calc_deriv_linear" stdlib2_result -1');
|
|
428
|
+
await mc.command('/function stdlib_calculus_test:test_deriv_central_linear');
|
|
429
|
+
await mc.ticks(3);
|
|
430
|
+
const result = await mc.scoreboard('#calc_deriv_linear', 'stdlib2_result');
|
|
431
|
+
expect(result).toBe(20000);
|
|
432
|
+
console.log(` deriv_central(linear f=2x) = ${result} ✓`);
|
|
433
|
+
}, 30_000);
|
|
434
|
+
test('integrate_trapezoid([0,5000,10000], 3, 10000) == 10000', async () => {
|
|
435
|
+
if (!serverOnline) {
|
|
436
|
+
console.warn(' SKIP: server offline');
|
|
437
|
+
return;
|
|
438
|
+
}
|
|
439
|
+
await mc.command('/scoreboard players set "#calc_trap" stdlib2_result -1');
|
|
440
|
+
await mc.command('/function stdlib_calculus_test:test_integrate_trapezoid');
|
|
441
|
+
await mc.ticks(3);
|
|
442
|
+
const result = await mc.scoreboard('#calc_trap', 'stdlib2_result');
|
|
443
|
+
expect(result).toBe(10000);
|
|
444
|
+
console.log(` integrate_trapezoid(linear) = ${result} ✓`);
|
|
445
|
+
}, 30_000);
|
|
446
|
+
test('integrate_trapezoid([10000,10000,10000], 3, 10000) == 20000 (constant f=1)', async () => {
|
|
447
|
+
if (!serverOnline) {
|
|
448
|
+
console.warn(' SKIP: server offline');
|
|
449
|
+
return;
|
|
450
|
+
}
|
|
451
|
+
await mc.command('/scoreboard players set "#calc_trap_const" stdlib2_result -1');
|
|
452
|
+
await mc.command('/function stdlib_calculus_test:test_integrate_trapezoid_constant');
|
|
453
|
+
await mc.ticks(3);
|
|
454
|
+
const result = await mc.scoreboard('#calc_trap_const', 'stdlib2_result');
|
|
455
|
+
expect(result).toBe(20000);
|
|
456
|
+
console.log(` integrate_trapezoid(constant) = ${result} ✓`);
|
|
457
|
+
}, 30_000);
|
|
458
|
+
test('integrate_simpson([0,5000,10000], 3, 10000) == 10000', async () => {
|
|
459
|
+
if (!serverOnline) {
|
|
460
|
+
console.warn(' SKIP: server offline');
|
|
461
|
+
return;
|
|
462
|
+
}
|
|
463
|
+
await mc.command('/scoreboard players set "#calc_simp" stdlib2_result -1');
|
|
464
|
+
await mc.command('/function stdlib_calculus_test:test_integrate_simpson');
|
|
465
|
+
await mc.ticks(3);
|
|
466
|
+
const result = await mc.scoreboard('#calc_simp', 'stdlib2_result');
|
|
467
|
+
expect(result).toBe(10000);
|
|
468
|
+
console.log(` integrate_simpson(linear) = ${result} ✓`);
|
|
469
|
+
}, 30_000);
|
|
470
|
+
test('running_mean: first sample (n=1) returns new_val = 20000', async () => {
|
|
471
|
+
if (!serverOnline) {
|
|
472
|
+
console.warn(' SKIP: server offline');
|
|
473
|
+
return;
|
|
474
|
+
}
|
|
475
|
+
await mc.command('/scoreboard players set "#calc_mean1" stdlib2_result -1');
|
|
476
|
+
await mc.command('/function stdlib_calculus_test:test_running_mean_first');
|
|
477
|
+
await mc.ticks(3);
|
|
478
|
+
const result = await mc.scoreboard('#calc_mean1', 'stdlib2_result');
|
|
479
|
+
expect(result).toBe(20000);
|
|
480
|
+
console.log(` running_mean(first) = ${result} ✓`);
|
|
481
|
+
}, 30_000);
|
|
482
|
+
test('running_mean(20000, 40000, n=2) == 30000 (average of 2.0 and 4.0)', async () => {
|
|
483
|
+
if (!serverOnline) {
|
|
484
|
+
console.warn(' SKIP: server offline');
|
|
485
|
+
return;
|
|
486
|
+
}
|
|
487
|
+
await mc.command('/scoreboard players set "#calc_mean2" stdlib2_result -1');
|
|
488
|
+
await mc.command('/function stdlib_calculus_test:test_running_mean_second');
|
|
489
|
+
await mc.ticks(3);
|
|
490
|
+
const result = await mc.scoreboard('#calc_mean2', 'stdlib2_result');
|
|
491
|
+
expect(result).toBe(30000);
|
|
492
|
+
console.log(` running_mean(second) = ${result} ✓`);
|
|
493
|
+
}, 30_000);
|
|
494
|
+
test('running_m2(0, 20000, 30000, 40000) == 20000', async () => {
|
|
495
|
+
if (!serverOnline) {
|
|
496
|
+
console.warn(' SKIP: server offline');
|
|
497
|
+
return;
|
|
498
|
+
}
|
|
499
|
+
await mc.command('/scoreboard players set "#calc_m2" stdlib2_result -1');
|
|
500
|
+
await mc.command('/function stdlib_calculus_test:test_running_m2');
|
|
501
|
+
await mc.ticks(3);
|
|
502
|
+
const result = await mc.scoreboard('#calc_m2', 'stdlib2_result');
|
|
503
|
+
expect(result).toBe(20000);
|
|
504
|
+
console.log(` running_m2 = ${result} ✓`);
|
|
505
|
+
}, 30_000);
|
|
506
|
+
test('variance_from_m2(20000, 2) == 20000', async () => {
|
|
507
|
+
if (!serverOnline) {
|
|
508
|
+
console.warn(' SKIP: server offline');
|
|
509
|
+
return;
|
|
510
|
+
}
|
|
511
|
+
await mc.command('/scoreboard players set "#calc_var" stdlib2_result -1');
|
|
512
|
+
await mc.command('/function stdlib_calculus_test:test_variance_from_m2');
|
|
513
|
+
await mc.ticks(3);
|
|
514
|
+
const result = await mc.scoreboard('#calc_var', 'stdlib2_result');
|
|
515
|
+
expect(result).toBe(20000);
|
|
516
|
+
console.log(` variance_from_m2 = ${result} ✓`);
|
|
517
|
+
}, 30_000);
|
|
518
|
+
});
|
|
519
|
+
// ---------------------------------------------------------------------------
|
|
520
|
+
// matrix.mcrs
|
|
521
|
+
// ---------------------------------------------------------------------------
|
|
522
|
+
describe('MC Integration — stdlib: matrix.mcrs', () => {
|
|
523
|
+
test('scale_x(30000, 20000) == 60000 (3.0 × 2.0 = 6.0 ×10000)', async () => {
|
|
524
|
+
if (!serverOnline) {
|
|
525
|
+
console.warn(' SKIP: server offline');
|
|
526
|
+
return;
|
|
527
|
+
}
|
|
528
|
+
await mc.command('/scoreboard players set "#mat_scale_x" stdlib2_result -1');
|
|
529
|
+
await mc.command('/function stdlib_matrix_test:test_scale_x');
|
|
530
|
+
await mc.ticks(3);
|
|
531
|
+
const result = await mc.scoreboard('#mat_scale_x', 'stdlib2_result');
|
|
532
|
+
expect(result).toBe(60000);
|
|
533
|
+
console.log(` scale_x(30000, 20000) = ${result} ✓`);
|
|
534
|
+
}, 30_000);
|
|
535
|
+
test('uniform_scale(15000, 30000) == 45000 (1.5 × 3.0)', async () => {
|
|
536
|
+
if (!serverOnline) {
|
|
537
|
+
console.warn(' SKIP: server offline');
|
|
538
|
+
return;
|
|
539
|
+
}
|
|
540
|
+
await mc.command('/scoreboard players set "#mat_unif_scale" stdlib2_result -1');
|
|
541
|
+
await mc.command('/function stdlib_matrix_test:test_uniform_scale');
|
|
542
|
+
await mc.ticks(3);
|
|
543
|
+
const result = await mc.scoreboard('#mat_unif_scale', 'stdlib2_result');
|
|
544
|
+
expect(result).toBe(45000);
|
|
545
|
+
console.log(` uniform_scale(15000, 30000) = ${result} ✓`);
|
|
546
|
+
}, 30_000);
|
|
547
|
+
test('billboard_y(900000) == 2700000 (90° → opposite face 270°)', async () => {
|
|
548
|
+
if (!serverOnline) {
|
|
549
|
+
console.warn(' SKIP: server offline');
|
|
550
|
+
return;
|
|
551
|
+
}
|
|
552
|
+
await mc.command('/scoreboard players set "#mat_billboard" stdlib2_result -1');
|
|
553
|
+
await mc.command('/function stdlib_matrix_test:test_billboard_y');
|
|
554
|
+
await mc.ticks(3);
|
|
555
|
+
const result = await mc.scoreboard('#mat_billboard', 'stdlib2_result');
|
|
556
|
+
expect(result).toBe(2700000);
|
|
557
|
+
console.log(` billboard_y(900000) = ${result} ✓`);
|
|
558
|
+
}, 30_000);
|
|
559
|
+
test('billboard_y(3000000) == 1200000 (wraps correctly)', async () => {
|
|
560
|
+
if (!serverOnline) {
|
|
561
|
+
console.warn(' SKIP: server offline');
|
|
562
|
+
return;
|
|
563
|
+
}
|
|
564
|
+
await mc.command('/scoreboard players set "#mat_billboard_wrap" stdlib2_result -1');
|
|
565
|
+
await mc.command('/function stdlib_matrix_test:test_billboard_y_wrap');
|
|
566
|
+
await mc.ticks(3);
|
|
567
|
+
const result = await mc.scoreboard('#mat_billboard_wrap', 'stdlib2_result');
|
|
568
|
+
expect(result).toBe(1200000);
|
|
569
|
+
console.log(` billboard_y(3000000) = ${result} ✓`);
|
|
570
|
+
}, 30_000);
|
|
571
|
+
test('lerp_angle(0, 10000, 5000) == 5000 (midpoint)', async () => {
|
|
572
|
+
if (!serverOnline) {
|
|
573
|
+
console.warn(' SKIP: server offline');
|
|
574
|
+
return;
|
|
575
|
+
}
|
|
576
|
+
await mc.command('/scoreboard players set "#mat_lerp_half" stdlib2_result -1');
|
|
577
|
+
await mc.command('/function stdlib_matrix_test:test_lerp_angle_half');
|
|
578
|
+
await mc.ticks(3);
|
|
579
|
+
const result = await mc.scoreboard('#mat_lerp_half', 'stdlib2_result');
|
|
580
|
+
expect(result).toBe(5000);
|
|
581
|
+
console.log(` lerp_angle(0,10000,5000) = ${result} ✓`);
|
|
582
|
+
}, 30_000);
|
|
583
|
+
test('lerp_angle(0, 10000, 10000) == 10000 (full)', async () => {
|
|
584
|
+
if (!serverOnline) {
|
|
585
|
+
console.warn(' SKIP: server offline');
|
|
586
|
+
return;
|
|
587
|
+
}
|
|
588
|
+
await mc.command('/scoreboard players set "#mat_lerp_full" stdlib2_result -1');
|
|
589
|
+
await mc.command('/function stdlib_matrix_test:test_lerp_angle_full');
|
|
590
|
+
await mc.ticks(3);
|
|
591
|
+
const result = await mc.scoreboard('#mat_lerp_full', 'stdlib2_result');
|
|
592
|
+
expect(result).toBe(10000);
|
|
593
|
+
console.log(` lerp_angle(0,10000,10000) = ${result} ✓`);
|
|
594
|
+
}, 30_000);
|
|
595
|
+
test('mat3_mul_elem: I × I element [0][0] == 10000 (= 1.0)', async () => {
|
|
596
|
+
if (!serverOnline) {
|
|
597
|
+
console.warn(' SKIP: server offline');
|
|
598
|
+
return;
|
|
599
|
+
}
|
|
600
|
+
await mc.command('/scoreboard players set "#mat3_id_00" stdlib2_result -1');
|
|
601
|
+
await mc.command('/function stdlib_matrix_test:test_mat3_identity_elem');
|
|
602
|
+
await mc.ticks(3);
|
|
603
|
+
const result = await mc.scoreboard('#mat3_id_00', 'stdlib2_result');
|
|
604
|
+
expect(result).toBe(10000);
|
|
605
|
+
console.log(` mat3_mul_elem I×I [0][0] = ${result} ✓`);
|
|
606
|
+
}, 30_000);
|
|
607
|
+
test('mat3_mul_elem: I × I element [0][1] == 0 (off-diagonal)', async () => {
|
|
608
|
+
if (!serverOnline) {
|
|
609
|
+
console.warn(' SKIP: server offline');
|
|
610
|
+
return;
|
|
611
|
+
}
|
|
612
|
+
await mc.command('/scoreboard players set "#mat3_id_01" stdlib2_result -1');
|
|
613
|
+
await mc.command('/function stdlib_matrix_test:test_mat3_identity_off_diag');
|
|
614
|
+
await mc.ticks(3);
|
|
615
|
+
const result = await mc.scoreboard('#mat3_id_01', 'stdlib2_result');
|
|
616
|
+
expect(result).toBe(0);
|
|
617
|
+
console.log(` mat3_mul_elem I×I [0][1] = ${result} ✓`);
|
|
618
|
+
}, 30_000);
|
|
619
|
+
test('mat3_mul_vec3_elem: scale(2,3,4) × (1,2,3) → x component == 20000', async () => {
|
|
620
|
+
if (!serverOnline) {
|
|
621
|
+
console.warn(' SKIP: server offline');
|
|
622
|
+
return;
|
|
623
|
+
}
|
|
624
|
+
await mc.command('/scoreboard players set "#mat3_vec_x" stdlib2_result -1');
|
|
625
|
+
await mc.command('/function stdlib_matrix_test:test_mat3_mul_vec3');
|
|
626
|
+
await mc.ticks(3);
|
|
627
|
+
const result = await mc.scoreboard('#mat3_vec_x', 'stdlib2_result');
|
|
628
|
+
expect(result).toBe(20000);
|
|
629
|
+
console.log(` mat3_mul_vec3 x = ${result} ✓`);
|
|
630
|
+
}, 30_000);
|
|
631
|
+
test('mat3_mul_vec3_elem: scale(2,3,4) × (1,2,3) → y component == 60000', async () => {
|
|
632
|
+
if (!serverOnline) {
|
|
633
|
+
console.warn(' SKIP: server offline');
|
|
634
|
+
return;
|
|
635
|
+
}
|
|
636
|
+
await mc.command('/scoreboard players set "#mat3_vec_y" stdlib2_result -1');
|
|
637
|
+
await mc.command('/function stdlib_matrix_test:test_mat3_mul_vec3_y');
|
|
638
|
+
await mc.ticks(3);
|
|
639
|
+
const result = await mc.scoreboard('#mat3_vec_y', 'stdlib2_result');
|
|
640
|
+
expect(result).toBe(60000);
|
|
641
|
+
console.log(` mat3_mul_vec3 y = ${result} ✓`);
|
|
642
|
+
}, 30_000);
|
|
643
|
+
test('rotate2d_x(10000, 0, angle=0) == 10000 (no rotation)', async () => {
|
|
644
|
+
if (!serverOnline) {
|
|
645
|
+
console.warn(' SKIP: server offline');
|
|
646
|
+
return;
|
|
647
|
+
}
|
|
648
|
+
await mc.command('/scoreboard players set "#mat_rot2d_id" stdlib2_result -1');
|
|
649
|
+
await mc.command('/function stdlib_matrix_test:test_rotate2d_identity');
|
|
650
|
+
await mc.ticks(3);
|
|
651
|
+
const result = await mc.scoreboard('#mat_rot2d_id', 'stdlib2_result');
|
|
652
|
+
// cos(0)=1000, sin(0)=0 in sin_fixed units; x' = 10000*1000/1000 - 0 = 10000
|
|
653
|
+
expect(result).toBe(10000);
|
|
654
|
+
console.log(` rotate2d_x identity = ${result} ✓`);
|
|
655
|
+
}, 30_000);
|
|
656
|
+
});
|
|
657
|
+
// ---------------------------------------------------------------------------
|
|
658
|
+
// signal.mcrs
|
|
659
|
+
// ---------------------------------------------------------------------------
|
|
660
|
+
describe('MC Integration — stdlib: signal.mcrs', () => {
|
|
661
|
+
test('bernoulli(seed, p=10000) == 1 (100% probability)', async () => {
|
|
662
|
+
if (!serverOnline) {
|
|
663
|
+
console.warn(' SKIP: server offline');
|
|
664
|
+
return;
|
|
665
|
+
}
|
|
666
|
+
await mc.command('/scoreboard players set "#sig_bern_1" stdlib2_result -1');
|
|
667
|
+
await mc.command('/function stdlib_signal_test:test_bernoulli_certain');
|
|
668
|
+
await mc.ticks(3);
|
|
669
|
+
const result = await mc.scoreboard('#sig_bern_1', 'stdlib2_result');
|
|
670
|
+
expect(result).toBe(1);
|
|
671
|
+
console.log(` bernoulli(p=100%) = ${result} ✓`);
|
|
672
|
+
}, 30_000);
|
|
673
|
+
test('bernoulli(seed, p=0) == 0 (0% probability)', async () => {
|
|
674
|
+
if (!serverOnline) {
|
|
675
|
+
console.warn(' SKIP: server offline');
|
|
676
|
+
return;
|
|
677
|
+
}
|
|
678
|
+
await mc.command('/scoreboard players set "#sig_bern_0" stdlib2_result -1');
|
|
679
|
+
await mc.command('/function stdlib_signal_test:test_bernoulli_impossible');
|
|
680
|
+
await mc.ticks(3);
|
|
681
|
+
const result = await mc.scoreboard('#sig_bern_0', 'stdlib2_result');
|
|
682
|
+
expect(result).toBe(0);
|
|
683
|
+
console.log(` bernoulli(p=0%) = ${result} ✓`);
|
|
684
|
+
}, 30_000);
|
|
685
|
+
test('weighted2(seed, 100, 0) == 0 (all weight on first)', async () => {
|
|
686
|
+
if (!serverOnline) {
|
|
687
|
+
console.warn(' SKIP: server offline');
|
|
688
|
+
return;
|
|
689
|
+
}
|
|
690
|
+
await mc.command('/scoreboard players set "#sig_w2_first" stdlib2_result -1');
|
|
691
|
+
await mc.command('/function stdlib_signal_test:test_weighted2_all_first');
|
|
692
|
+
await mc.ticks(3);
|
|
693
|
+
const result = await mc.scoreboard('#sig_w2_first', 'stdlib2_result');
|
|
694
|
+
expect(result).toBe(0);
|
|
695
|
+
console.log(` weighted2(100,0) = ${result} ✓`);
|
|
696
|
+
}, 30_000);
|
|
697
|
+
test('weighted2(seed, 0, 100) == 1 (all weight on second)', async () => {
|
|
698
|
+
if (!serverOnline) {
|
|
699
|
+
console.warn(' SKIP: server offline');
|
|
700
|
+
return;
|
|
701
|
+
}
|
|
702
|
+
await mc.command('/scoreboard players set "#sig_w2_second" stdlib2_result -1');
|
|
703
|
+
await mc.command('/function stdlib_signal_test:test_weighted2_all_second');
|
|
704
|
+
await mc.ticks(3);
|
|
705
|
+
const result = await mc.scoreboard('#sig_w2_second', 'stdlib2_result');
|
|
706
|
+
expect(result).toBe(1);
|
|
707
|
+
console.log(` weighted2(0,100) = ${result} ✓`);
|
|
708
|
+
}, 30_000);
|
|
709
|
+
test('weighted3(seed, 100, 0, 0) == 0 (all weight on first)', async () => {
|
|
710
|
+
if (!serverOnline) {
|
|
711
|
+
console.warn(' SKIP: server offline');
|
|
712
|
+
return;
|
|
713
|
+
}
|
|
714
|
+
await mc.command('/scoreboard players set "#sig_w3_first" stdlib2_result -1');
|
|
715
|
+
await mc.command('/function stdlib_signal_test:test_weighted3_all_first');
|
|
716
|
+
await mc.ticks(3);
|
|
717
|
+
const result = await mc.scoreboard('#sig_w3_first', 'stdlib2_result');
|
|
718
|
+
expect(result).toBe(0);
|
|
719
|
+
console.log(` weighted3(100,0,0) = ${result} ✓`);
|
|
720
|
+
}, 30_000);
|
|
721
|
+
test('weighted3(seed, 0, 0, 100) == 2 (all weight on last)', async () => {
|
|
722
|
+
if (!serverOnline) {
|
|
723
|
+
console.warn(' SKIP: server offline');
|
|
724
|
+
return;
|
|
725
|
+
}
|
|
726
|
+
await mc.command('/scoreboard players set "#sig_w3_last" stdlib2_result -1');
|
|
727
|
+
await mc.command('/function stdlib_signal_test:test_weighted3_all_last');
|
|
728
|
+
await mc.ticks(3);
|
|
729
|
+
const result = await mc.scoreboard('#sig_w3_last', 'stdlib2_result');
|
|
730
|
+
expect(result).toBe(2);
|
|
731
|
+
console.log(` weighted3(0,0,100) = ${result} ✓`);
|
|
732
|
+
}, 30_000);
|
|
733
|
+
test('uniform_frac(seed) ∈ [0, 10000]', async () => {
|
|
734
|
+
if (!serverOnline) {
|
|
735
|
+
console.warn(' SKIP: server offline');
|
|
736
|
+
return;
|
|
737
|
+
}
|
|
738
|
+
await mc.command('/scoreboard players set "#sig_ufrac" stdlib2_result -1');
|
|
739
|
+
await mc.command('/function stdlib_signal_test:test_uniform_frac_range');
|
|
740
|
+
await mc.ticks(3);
|
|
741
|
+
const result = await mc.scoreboard('#sig_ufrac', 'stdlib2_result');
|
|
742
|
+
expect(result).toBeGreaterThanOrEqual(0);
|
|
743
|
+
expect(result).toBeLessThanOrEqual(10000);
|
|
744
|
+
console.log(` uniform_frac = ${result} ∈ [0, 10000] ✓`);
|
|
745
|
+
}, 30_000);
|
|
746
|
+
test('uniform_int(seed, 5, 10) ∈ [5, 10]', async () => {
|
|
747
|
+
if (!serverOnline) {
|
|
748
|
+
console.warn(' SKIP: server offline');
|
|
749
|
+
return;
|
|
750
|
+
}
|
|
751
|
+
await mc.command('/scoreboard players set "#sig_uint" stdlib2_result -1');
|
|
752
|
+
await mc.command('/function stdlib_signal_test:test_uniform_int_range');
|
|
753
|
+
await mc.ticks(3);
|
|
754
|
+
const result = await mc.scoreboard('#sig_uint', 'stdlib2_result');
|
|
755
|
+
expect(result).toBeGreaterThanOrEqual(5);
|
|
756
|
+
expect(result).toBeLessThanOrEqual(10);
|
|
757
|
+
console.log(` uniform_int(5,10) = ${result} ∈ [5, 10] ✓`);
|
|
758
|
+
}, 30_000);
|
|
759
|
+
test('normal_approx12 ∈ [-60000, 60000]', async () => {
|
|
760
|
+
if (!serverOnline) {
|
|
761
|
+
console.warn(' SKIP: server offline');
|
|
762
|
+
return;
|
|
763
|
+
}
|
|
764
|
+
await mc.command('/scoreboard players set "#sig_normal" stdlib2_result 0');
|
|
765
|
+
await mc.command('/function stdlib_signal_test:test_normal_approx_range');
|
|
766
|
+
await mc.ticks(3);
|
|
767
|
+
const result = await mc.scoreboard('#sig_normal', 'stdlib2_result');
|
|
768
|
+
expect(result).toBeGreaterThanOrEqual(-60000);
|
|
769
|
+
expect(result).toBeLessThanOrEqual(60000);
|
|
770
|
+
console.log(` normal_approx12(42) = ${result} ∈ [-60000, 60000] ✓`);
|
|
771
|
+
}, 30_000);
|
|
772
|
+
test('_sin45(2) == 10000 (sin(90°) = 1.0 ×10000)', async () => {
|
|
773
|
+
if (!serverOnline) {
|
|
774
|
+
console.warn(' SKIP: server offline');
|
|
775
|
+
return;
|
|
776
|
+
}
|
|
777
|
+
await mc.command('/scoreboard players set "#sig_sin45_2" stdlib2_result -1');
|
|
778
|
+
await mc.command('/function stdlib_signal_test:test_sin45_known');
|
|
779
|
+
await mc.ticks(3);
|
|
780
|
+
const result = await mc.scoreboard('#sig_sin45_2', 'stdlib2_result');
|
|
781
|
+
expect(result).toBe(10000);
|
|
782
|
+
console.log(` _sin45(2) = ${result} ✓`);
|
|
783
|
+
}, 30_000);
|
|
784
|
+
test('_sin45(0) == 0 (sin(0°) = 0)', async () => {
|
|
785
|
+
if (!serverOnline) {
|
|
786
|
+
console.warn(' SKIP: server offline');
|
|
787
|
+
return;
|
|
788
|
+
}
|
|
789
|
+
await mc.command('/scoreboard players set "#sig_sin45_0" stdlib2_result -1');
|
|
790
|
+
await mc.command('/function stdlib_signal_test:test_sin45_zero');
|
|
791
|
+
await mc.ticks(3);
|
|
792
|
+
const result = await mc.scoreboard('#sig_sin45_0', 'stdlib2_result');
|
|
793
|
+
expect(result).toBe(0);
|
|
794
|
+
console.log(` _sin45(0) = ${result} ✓`);
|
|
795
|
+
}, 30_000);
|
|
796
|
+
test('_cos45(0) == 10000 (cos(0°) = 1.0 ×10000)', async () => {
|
|
797
|
+
if (!serverOnline) {
|
|
798
|
+
console.warn(' SKIP: server offline');
|
|
799
|
+
return;
|
|
800
|
+
}
|
|
801
|
+
await mc.command('/scoreboard players set "#sig_cos45_0" stdlib2_result -1');
|
|
802
|
+
await mc.command('/function stdlib_signal_test:test_cos45_identity');
|
|
803
|
+
await mc.ticks(3);
|
|
804
|
+
const result = await mc.scoreboard('#sig_cos45_0', 'stdlib2_result');
|
|
805
|
+
expect(result).toBe(10000);
|
|
806
|
+
console.log(` _cos45(0) = ${result} ✓`);
|
|
807
|
+
}, 30_000);
|
|
808
|
+
test('dft_real DC bin of constant signal [1,1,1,1] × n=4 == 10000', async () => {
|
|
809
|
+
if (!serverOnline) {
|
|
810
|
+
console.warn(' SKIP: server offline');
|
|
811
|
+
return;
|
|
812
|
+
}
|
|
813
|
+
await mc.command('/scoreboard players set "#sig_dft_dc" stdlib2_result -1');
|
|
814
|
+
await mc.command('/function stdlib_signal_test:test_dft_dc_bin');
|
|
815
|
+
await mc.ticks(3);
|
|
816
|
+
const result = await mc.scoreboard('#sig_dft_dc', 'stdlib2_result');
|
|
817
|
+
expect(result).toBe(10000);
|
|
818
|
+
console.log(` dft_real DC bin = ${result} ✓`);
|
|
819
|
+
}, 30_000);
|
|
820
|
+
test('dft_imag DC bin of constant signal == 0 (no imaginary component)', async () => {
|
|
821
|
+
if (!serverOnline) {
|
|
822
|
+
console.warn(' SKIP: server offline');
|
|
823
|
+
return;
|
|
824
|
+
}
|
|
825
|
+
await mc.command('/scoreboard players set "#sig_dft_imag_dc" stdlib2_result -1');
|
|
826
|
+
await mc.command('/function stdlib_signal_test:test_dft_imag_dc');
|
|
827
|
+
await mc.ticks(3);
|
|
828
|
+
const result = await mc.scoreboard('#sig_dft_imag_dc', 'stdlib2_result');
|
|
829
|
+
expect(result).toBe(0);
|
|
830
|
+
console.log(` dft_imag DC bin = ${result} ✓`);
|
|
831
|
+
}, 30_000);
|
|
832
|
+
});
|
|
833
|
+
//# sourceMappingURL=stdlib-coverage-2.test.js.map
|