redscript-mc 2.4.1 → 2.5.0
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 +16 -0
- package/README.md +2 -0
- package/dist/data/mathdemo/function/__load.mcfunction +2 -0
- package/dist/data/mathdemo/function/_atan_init.mcfunction +4 -0
- package/dist/data/mathdemo/function/_math_init.mcfunction +4 -0
- package/dist/data/mathdemo/function/add2d_x.mcfunction +5 -0
- package/dist/data/mathdemo/function/add2d_y.mcfunction +5 -0
- package/dist/data/mathdemo/function/add3d_x.mcfunction +5 -0
- package/dist/data/mathdemo/function/add3d_y.mcfunction +5 -0
- package/dist/data/mathdemo/function/add3d_z.mcfunction +5 -0
- package/dist/data/mathdemo/function/air_drag_fx.mcfunction +2 -0
- package/dist/data/mathdemo/function/apply_drag.mcfunction +8 -0
- package/dist/data/mathdemo/function/apply_gravity.mcfunction +6 -0
- package/dist/data/mathdemo/function/approx_eq.mcfunction +10 -0
- package/dist/data/mathdemo/function/approx_eq__merge_1.mcfunction +3 -0
- package/dist/data/mathdemo/function/approx_eq__merge_3.mcfunction +2 -0
- package/dist/data/mathdemo/function/approx_eq__then_0.mcfunction +4 -0
- package/dist/data/mathdemo/function/approx_eq__then_2.mcfunction +2 -0
- package/dist/data/mathdemo/function/atan2_fixed.mcfunction +6 -0
- package/dist/data/mathdemo/function/atan2_fixed__else_30.mcfunction +2 -0
- package/dist/data/mathdemo/function/atan2_fixed__loop_body_26.mcfunction +21 -0
- package/dist/data/mathdemo/function/atan2_fixed__loop_exit_27.mcfunction +5 -0
- package/dist/data/mathdemo/function/atan2_fixed__loop_header_25.mcfunction +3 -0
- package/dist/data/mathdemo/function/atan2_fixed__merge_1.mcfunction +4 -0
- package/dist/data/mathdemo/function/atan2_fixed__merge_10.mcfunction +5 -0
- package/dist/data/mathdemo/function/atan2_fixed__merge_12.mcfunction +2 -0
- package/dist/data/mathdemo/function/atan2_fixed__merge_16.mcfunction +5 -0
- package/dist/data/mathdemo/function/atan2_fixed__merge_18.mcfunction +4 -0
- package/dist/data/mathdemo/function/atan2_fixed__merge_20.mcfunction +4 -0
- package/dist/data/mathdemo/function/atan2_fixed__merge_22.mcfunction +4 -0
- package/dist/data/mathdemo/function/atan2_fixed__merge_24.mcfunction +3 -0
- package/dist/data/mathdemo/function/atan2_fixed__merge_29.mcfunction +1 -0
- package/dist/data/mathdemo/function/atan2_fixed__merge_3.mcfunction +4 -0
- package/dist/data/mathdemo/function/atan2_fixed__merge_32.mcfunction +4 -0
- package/dist/data/mathdemo/function/atan2_fixed__merge_34.mcfunction +4 -0
- package/dist/data/mathdemo/function/atan2_fixed__merge_36.mcfunction +3 -0
- package/dist/data/mathdemo/function/atan2_fixed__merge_40.mcfunction +3 -0
- package/dist/data/mathdemo/function/atan2_fixed__merge_6.mcfunction +2 -0
- package/dist/data/mathdemo/function/atan2_fixed__then_0.mcfunction +4 -0
- package/dist/data/mathdemo/function/atan2_fixed__then_11.mcfunction +2 -0
- package/dist/data/mathdemo/function/atan2_fixed__then_15.mcfunction +4 -0
- package/dist/data/mathdemo/function/atan2_fixed__then_17.mcfunction +4 -0
- package/dist/data/mathdemo/function/atan2_fixed__then_19.mcfunction +2 -0
- package/dist/data/mathdemo/function/atan2_fixed__then_2.mcfunction +2 -0
- package/dist/data/mathdemo/function/atan2_fixed__then_21.mcfunction +2 -0
- package/dist/data/mathdemo/function/atan2_fixed__then_23.mcfunction +5 -0
- package/dist/data/mathdemo/function/atan2_fixed__then_28.mcfunction +4 -0
- package/dist/data/mathdemo/function/atan2_fixed__then_31.mcfunction +4 -0
- package/dist/data/mathdemo/function/atan2_fixed__then_33.mcfunction +4 -0
- package/dist/data/mathdemo/function/atan2_fixed__then_35.mcfunction +1 -0
- package/dist/data/mathdemo/function/atan2_fixed__then_39.mcfunction +3 -0
- package/dist/data/mathdemo/function/atan2_fixed__then_5.mcfunction +2 -0
- package/dist/data/mathdemo/function/atan2_fixed__then_9.mcfunction +4 -0
- package/dist/data/mathdemo/function/bounce_v.mcfunction +10 -0
- package/dist/data/mathdemo/function/cbrt_fx.mcfunction +5 -0
- package/dist/data/mathdemo/function/cbrt_fx__loop_body_6.mcfunction +7 -0
- package/dist/data/mathdemo/function/cbrt_fx__loop_exit_7.mcfunction +1 -0
- package/dist/data/mathdemo/function/cbrt_fx__loop_header_5.mcfunction +4 -0
- package/dist/data/mathdemo/function/cbrt_fx__merge_1.mcfunction +8 -0
- package/dist/data/mathdemo/function/cbrt_fx__merge_11.mcfunction +5 -0
- package/dist/data/mathdemo/function/cbrt_fx__merge_13.mcfunction +4 -0
- package/dist/data/mathdemo/function/cbrt_fx__merge_4.mcfunction +2 -0
- package/dist/data/mathdemo/function/cbrt_fx__merge_9.mcfunction +13 -0
- package/dist/data/mathdemo/function/cbrt_fx__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/cbrt_fx__then_10.mcfunction +2 -0
- package/dist/data/mathdemo/function/cbrt_fx__then_12.mcfunction +2 -0
- package/dist/data/mathdemo/function/cbrt_fx__then_3.mcfunction +2 -0
- package/dist/data/mathdemo/function/cbrt_fx__then_8.mcfunction +2 -0
- package/dist/data/mathdemo/function/ceil_div.mcfunction +9 -0
- package/dist/data/mathdemo/function/chebyshev.mcfunction +14 -0
- package/dist/data/mathdemo/function/chebyshev3d.mcfunction +19 -0
- package/dist/data/mathdemo/function/chebyshev3d__merge_1.mcfunction +4 -0
- package/dist/data/mathdemo/function/chebyshev3d__merge_3.mcfunction +4 -0
- package/dist/data/mathdemo/function/chebyshev3d__merge_5.mcfunction +4 -0
- package/dist/data/mathdemo/function/chebyshev3d__merge_7.mcfunction +3 -0
- package/dist/data/mathdemo/function/chebyshev3d__merge_9.mcfunction +1 -0
- package/dist/data/mathdemo/function/chebyshev3d__then_0.mcfunction +4 -0
- package/dist/data/mathdemo/function/chebyshev3d__then_2.mcfunction +4 -0
- package/dist/data/mathdemo/function/chebyshev3d__then_4.mcfunction +4 -0
- package/dist/data/mathdemo/function/chebyshev3d__then_6.mcfunction +2 -0
- package/dist/data/mathdemo/function/chebyshev3d__then_8.mcfunction +2 -0
- package/dist/data/mathdemo/function/chebyshev__merge_1.mcfunction +4 -0
- package/dist/data/mathdemo/function/chebyshev__merge_3.mcfunction +3 -0
- package/dist/data/mathdemo/function/chebyshev__merge_5.mcfunction +1 -0
- package/dist/data/mathdemo/function/chebyshev__then_0.mcfunction +4 -0
- package/dist/data/mathdemo/function/chebyshev__then_2.mcfunction +4 -0
- package/dist/data/mathdemo/function/chebyshev__then_4.mcfunction +1 -0
- package/dist/data/mathdemo/function/circular_x.mcfunction +14 -0
- package/dist/data/mathdemo/function/circular_z.mcfunction +14 -0
- package/dist/data/mathdemo/function/clamp_velocity.mcfunction +5 -0
- package/dist/data/mathdemo/function/clamp_velocity__merge_1.mcfunction +5 -0
- package/dist/data/mathdemo/function/clamp_velocity__merge_4.mcfunction +1 -0
- package/dist/data/mathdemo/function/clamp_velocity__then_0.mcfunction +1 -0
- package/dist/data/mathdemo/function/clamp_velocity__then_3.mcfunction +3 -0
- package/dist/data/mathdemo/function/combinations.mcfunction +6 -0
- package/dist/data/mathdemo/function/combinations__loop_body_9.mcfunction +15 -0
- package/dist/data/mathdemo/function/combinations__loop_exit_10.mcfunction +1 -0
- package/dist/data/mathdemo/function/combinations__loop_header_8.mcfunction +3 -0
- package/dist/data/mathdemo/function/combinations__merge_1.mcfunction +3 -0
- package/dist/data/mathdemo/function/combinations__merge_4.mcfunction +6 -0
- package/dist/data/mathdemo/function/combinations__merge_7.mcfunction +3 -0
- package/dist/data/mathdemo/function/combinations__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/combinations__then_3.mcfunction +2 -0
- package/dist/data/mathdemo/function/combinations__then_6.mcfunction +4 -0
- package/dist/data/mathdemo/function/cos_fixed.mcfunction +7 -0
- package/dist/data/mathdemo/function/cross2d.mcfunction +11 -0
- package/dist/data/mathdemo/function/cross3d_x.mcfunction +11 -0
- package/dist/data/mathdemo/function/cross3d_y.mcfunction +11 -0
- package/dist/data/mathdemo/function/cross3d_z.mcfunction +11 -0
- package/dist/data/mathdemo/function/demo_easing.mcfunction +12 -0
- package/dist/data/mathdemo/function/demo_math.mcfunction +16 -0
- package/dist/data/mathdemo/function/demo_noise.mcfunction +14 -0
- package/dist/data/mathdemo/function/demo_physics.mcfunction +11 -0
- package/dist/data/mathdemo/function/demo_physics__loop_body_1.mcfunction +9 -0
- package/dist/data/mathdemo/function/demo_physics__loop_body_4.mcfunction +18 -0
- package/dist/data/mathdemo/function/demo_physics__loop_exit_2.mcfunction +6 -0
- package/dist/data/mathdemo/function/demo_physics__loop_exit_5.mcfunction +1 -0
- package/dist/data/mathdemo/function/demo_physics__loop_header_0.mcfunction +4 -0
- package/dist/data/mathdemo/function/demo_physics__loop_header_3.mcfunction +4 -0
- package/dist/data/mathdemo/function/distance2d_fixed.mcfunction +13 -0
- package/dist/data/mathdemo/function/distance3d_fixed.mcfunction +18 -0
- package/dist/data/mathdemo/function/divfix.mcfunction +6 -0
- package/dist/data/mathdemo/function/divfix__merge_1.mcfunction +6 -0
- package/dist/data/mathdemo/function/divfix__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/dot2d.mcfunction +11 -0
- package/dist/data/mathdemo/function/dot3d.mcfunction +17 -0
- package/dist/data/mathdemo/function/ease_in_back.mcfunction +26 -0
- package/dist/data/mathdemo/function/ease_in_bounce.mcfunction +9 -0
- package/dist/data/mathdemo/function/ease_in_cubic.mcfunction +12 -0
- package/dist/data/mathdemo/function/ease_in_expo.mcfunction +5 -0
- package/dist/data/mathdemo/function/ease_in_expo__merge_1.mcfunction +11 -0
- package/dist/data/mathdemo/function/ease_in_expo__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/ease_in_out_back.mcfunction +5 -0
- package/dist/data/mathdemo/function/ease_in_out_back__merge_1.mcfunction +14 -0
- package/dist/data/mathdemo/function/ease_in_out_back__then_0.mcfunction +10 -0
- package/dist/data/mathdemo/function/ease_in_out_bounce.mcfunction +5 -0
- package/dist/data/mathdemo/function/ease_in_out_bounce__merge_1.mcfunction +14 -0
- package/dist/data/mathdemo/function/ease_in_out_bounce__then_0.mcfunction +10 -0
- package/dist/data/mathdemo/function/ease_in_out_cubic.mcfunction +5 -0
- package/dist/data/mathdemo/function/ease_in_out_cubic__merge_1.mcfunction +17 -0
- package/dist/data/mathdemo/function/ease_in_out_cubic__then_0.mcfunction +13 -0
- package/dist/data/mathdemo/function/ease_in_out_quad.mcfunction +5 -0
- package/dist/data/mathdemo/function/ease_in_out_quad__merge_1.mcfunction +12 -0
- package/dist/data/mathdemo/function/ease_in_out_quad__then_0.mcfunction +8 -0
- package/dist/data/mathdemo/function/ease_in_out_sine.mcfunction +5 -0
- package/dist/data/mathdemo/function/ease_in_out_sine__merge_1.mcfunction +14 -0
- package/dist/data/mathdemo/function/ease_in_out_sine__then_0.mcfunction +10 -0
- package/dist/data/mathdemo/function/ease_in_quad.mcfunction +7 -0
- package/dist/data/mathdemo/function/ease_in_quad__const_5000.mcfunction +5 -0
- package/dist/data/mathdemo/function/ease_in_quart.mcfunction +12 -0
- package/dist/data/mathdemo/function/ease_in_sine.mcfunction +30 -0
- package/dist/data/mathdemo/function/ease_linear.mcfunction +2 -0
- package/dist/data/mathdemo/function/ease_linear__const_5000.mcfunction +2 -0
- package/dist/data/mathdemo/function/ease_out_back.mcfunction +9 -0
- package/dist/data/mathdemo/function/ease_out_back__const_5000.mcfunction +7 -0
- package/dist/data/mathdemo/function/ease_out_bounce.mcfunction +6 -0
- package/dist/data/mathdemo/function/ease_out_bounce__merge_1.mcfunction +4 -0
- package/dist/data/mathdemo/function/ease_out_bounce__merge_4.mcfunction +4 -0
- package/dist/data/mathdemo/function/ease_out_bounce__merge_7.mcfunction +15 -0
- package/dist/data/mathdemo/function/ease_out_bounce__then_0.mcfunction +11 -0
- package/dist/data/mathdemo/function/ease_out_bounce__then_3.mcfunction +15 -0
- package/dist/data/mathdemo/function/ease_out_bounce__then_6.mcfunction +15 -0
- package/dist/data/mathdemo/function/ease_out_cubic.mcfunction +16 -0
- package/dist/data/mathdemo/function/ease_out_cubic__const_5000.mcfunction +14 -0
- package/dist/data/mathdemo/function/ease_out_expo.mcfunction +5 -0
- package/dist/data/mathdemo/function/ease_out_expo__merge_1.mcfunction +8 -0
- package/dist/data/mathdemo/function/ease_out_expo__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/ease_out_quad.mcfunction +11 -0
- package/dist/data/mathdemo/function/ease_out_quart.mcfunction +16 -0
- package/dist/data/mathdemo/function/ease_out_sine.mcfunction +9 -0
- package/dist/data/mathdemo/function/ease_smooth.mcfunction +23 -0
- package/dist/data/mathdemo/function/ease_smoother.mcfunction +41 -0
- package/dist/data/mathdemo/function/exp_fx.mcfunction +16 -0
- package/dist/data/mathdemo/function/exp_fx__loop_body_10.mcfunction +8 -0
- package/dist/data/mathdemo/function/exp_fx__loop_body_5.mcfunction +8 -0
- package/dist/data/mathdemo/function/exp_fx__loop_exit_11.mcfunction +1 -0
- package/dist/data/mathdemo/function/exp_fx__loop_exit_6.mcfunction +1 -0
- package/dist/data/mathdemo/function/exp_fx__loop_header_4.mcfunction +3 -0
- package/dist/data/mathdemo/function/exp_fx__loop_header_9.mcfunction +3 -0
- package/dist/data/mathdemo/function/exp_fx__merge_1.mcfunction +47 -0
- package/dist/data/mathdemo/function/exp_fx__merge_3.mcfunction +4 -0
- package/dist/data/mathdemo/function/exp_fx__merge_8.mcfunction +1 -0
- package/dist/data/mathdemo/function/exp_fx__then_0.mcfunction +7 -0
- package/dist/data/mathdemo/function/exp_fx__then_2.mcfunction +2 -0
- package/dist/data/mathdemo/function/exp_fx__then_7.mcfunction +5 -0
- package/dist/data/mathdemo/function/factorial.mcfunction +5 -0
- package/dist/data/mathdemo/function/factorial__loop_body_4.mcfunction +7 -0
- package/dist/data/mathdemo/function/factorial__loop_exit_5.mcfunction +1 -0
- package/dist/data/mathdemo/function/factorial__loop_header_3.mcfunction +3 -0
- package/dist/data/mathdemo/function/factorial__merge_1.mcfunction +3 -0
- package/dist/data/mathdemo/function/factorial__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/fbm_1d.mcfunction +9 -0
- package/dist/data/mathdemo/function/fbm_1d__loop_body_1.mcfunction +33 -0
- package/dist/data/mathdemo/function/fbm_1d__loop_exit_2.mcfunction +4 -0
- package/dist/data/mathdemo/function/fbm_1d__loop_header_0.mcfunction +3 -0
- package/dist/data/mathdemo/function/fbm_1d__merge_4.mcfunction +6 -0
- package/dist/data/mathdemo/function/fbm_1d__then_3.mcfunction +2 -0
- package/dist/data/mathdemo/function/fbm_2d.mcfunction +10 -0
- package/dist/data/mathdemo/function/fbm_2d__loop_body_1.mcfunction +39 -0
- package/dist/data/mathdemo/function/fbm_2d__loop_exit_2.mcfunction +4 -0
- package/dist/data/mathdemo/function/fbm_2d__loop_header_0.mcfunction +3 -0
- package/dist/data/mathdemo/function/fbm_2d__merge_4.mcfunction +6 -0
- package/dist/data/mathdemo/function/fbm_2d__then_3.mcfunction +2 -0
- package/dist/data/mathdemo/function/friction_decel.mcfunction +5 -0
- package/dist/data/mathdemo/function/friction_decel__merge_1.mcfunction +5 -0
- package/dist/data/mathdemo/function/friction_decel__merge_4.mcfunction +2 -0
- package/dist/data/mathdemo/function/friction_decel__then_0.mcfunction +3 -0
- package/dist/data/mathdemo/function/friction_decel__then_3.mcfunction +3 -0
- package/dist/data/mathdemo/function/gamma_int.mcfunction +5 -0
- package/dist/data/mathdemo/function/gamma_int__merge_1.mcfunction +6 -0
- package/dist/data/mathdemo/function/gamma_int__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/gcd.mcfunction +7 -0
- package/dist/data/mathdemo/function/gcd__loop_body_5.mcfunction +5 -0
- package/dist/data/mathdemo/function/gcd__loop_exit_6.mcfunction +1 -0
- package/dist/data/mathdemo/function/gcd__loop_header_4.mcfunction +4 -0
- package/dist/data/mathdemo/function/gcd__merge_1.mcfunction +5 -0
- package/dist/data/mathdemo/function/gcd__merge_3.mcfunction +1 -0
- package/dist/data/mathdemo/function/gcd__then_0.mcfunction +4 -0
- package/dist/data/mathdemo/function/gcd__then_2.mcfunction +4 -0
- package/dist/data/mathdemo/function/gravity_fx.mcfunction +2 -0
- package/dist/data/mathdemo/function/hash_1d.mcfunction +15 -0
- package/dist/data/mathdemo/function/hash_1d_pos.mcfunction +9 -0
- package/dist/data/mathdemo/function/hash_1d_pos__merge_1.mcfunction +4 -0
- package/dist/data/mathdemo/function/hash_1d_pos__then_0.mcfunction +4 -0
- package/dist/data/mathdemo/function/hash_2d.mcfunction +11 -0
- package/dist/data/mathdemo/function/hash_2d_pos.mcfunction +11 -0
- package/dist/data/mathdemo/function/hash_2d_pos__merge_1.mcfunction +4 -0
- package/dist/data/mathdemo/function/hash_2d_pos__then_0.mcfunction +4 -0
- package/dist/data/mathdemo/function/impact_velocity.mcfunction +5 -0
- package/dist/data/mathdemo/function/impact_velocity__merge_1.mcfunction +16 -0
- package/dist/data/mathdemo/function/impact_velocity__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/is_grounded.mcfunction +5 -0
- package/dist/data/mathdemo/function/is_grounded__merge_1.mcfunction +2 -0
- package/dist/data/mathdemo/function/is_grounded__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/isqrt.mcfunction +5 -0
- package/dist/data/mathdemo/function/isqrt__loop_body_10.mcfunction +8 -0
- package/dist/data/mathdemo/function/isqrt__loop_body_13.mcfunction +11 -0
- package/dist/data/mathdemo/function/isqrt__loop_body_7.mcfunction +8 -0
- package/dist/data/mathdemo/function/isqrt__loop_exit_11.mcfunction +2 -0
- package/dist/data/mathdemo/function/isqrt__loop_exit_14.mcfunction +1 -0
- package/dist/data/mathdemo/function/isqrt__loop_exit_8.mcfunction +9 -0
- package/dist/data/mathdemo/function/isqrt__loop_header_12.mcfunction +4 -0
- package/dist/data/mathdemo/function/isqrt__loop_header_6.mcfunction +4 -0
- package/dist/data/mathdemo/function/isqrt__loop_header_9.mcfunction +3 -0
- package/dist/data/mathdemo/function/isqrt__merge_1.mcfunction +4 -0
- package/dist/data/mathdemo/function/isqrt__merge_16.mcfunction +5 -0
- package/dist/data/mathdemo/function/isqrt__merge_4.mcfunction +3 -0
- package/dist/data/mathdemo/function/isqrt__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/isqrt__then_15.mcfunction +1 -0
- package/dist/data/mathdemo/function/isqrt__then_3.mcfunction +2 -0
- package/dist/data/mathdemo/function/lcm.mcfunction +11 -0
- package/dist/data/mathdemo/function/lcm__merge_1.mcfunction +5 -0
- package/dist/data/mathdemo/function/lcm__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/length2d_fixed.mcfunction +15 -0
- package/dist/data/mathdemo/function/length3d_fixed.mcfunction +20 -0
- package/dist/data/mathdemo/function/lerp.mcfunction +13 -0
- package/dist/data/mathdemo/function/lerp2d_x.mcfunction +13 -0
- package/dist/data/mathdemo/function/lerp2d_y.mcfunction +13 -0
- package/dist/data/mathdemo/function/ln.mcfunction +9 -0
- package/dist/data/mathdemo/function/ln__loop_body_1.mcfunction +8 -0
- package/dist/data/mathdemo/function/ln__loop_body_4.mcfunction +8 -0
- package/dist/data/mathdemo/function/ln__loop_exit_2.mcfunction +1 -0
- package/dist/data/mathdemo/function/ln__loop_exit_5.mcfunction +37 -0
- package/dist/data/mathdemo/function/ln__loop_header_0.mcfunction +3 -0
- package/dist/data/mathdemo/function/ln__loop_header_3.mcfunction +6 -0
- package/dist/data/mathdemo/function/load.mcfunction +1 -0
- package/dist/data/mathdemo/function/log10_fx.mcfunction +11 -0
- package/dist/data/mathdemo/function/log2_fx.mcfunction +11 -0
- package/dist/data/mathdemo/function/log2_int.mcfunction +5 -0
- package/dist/data/mathdemo/function/log2_int__loop_body_4.mcfunction +8 -0
- package/dist/data/mathdemo/function/log2_int__loop_exit_5.mcfunction +1 -0
- package/dist/data/mathdemo/function/log2_int__loop_header_3.mcfunction +4 -0
- package/dist/data/mathdemo/function/log2_int__merge_1.mcfunction +3 -0
- package/dist/data/mathdemo/function/log2_int__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/loga_fx.mcfunction +10 -0
- package/dist/data/mathdemo/function/loga_fx__merge_1.mcfunction +9 -0
- package/dist/data/mathdemo/function/loga_fx__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/manhattan.mcfunction +14 -0
- package/dist/data/mathdemo/function/manhattan3d.mcfunction +19 -0
- package/dist/data/mathdemo/function/manhattan3d__merge_1.mcfunction +4 -0
- package/dist/data/mathdemo/function/manhattan3d__merge_3.mcfunction +4 -0
- package/dist/data/mathdemo/function/manhattan3d__merge_5.mcfunction +5 -0
- package/dist/data/mathdemo/function/manhattan3d__then_0.mcfunction +4 -0
- package/dist/data/mathdemo/function/manhattan3d__then_2.mcfunction +4 -0
- package/dist/data/mathdemo/function/manhattan3d__then_4.mcfunction +4 -0
- package/dist/data/mathdemo/function/manhattan__merge_1.mcfunction +4 -0
- package/dist/data/mathdemo/function/manhattan__merge_3.mcfunction +3 -0
- package/dist/data/mathdemo/function/manhattan__then_0.mcfunction +4 -0
- package/dist/data/mathdemo/function/manhattan__then_2.mcfunction +4 -0
- package/dist/data/mathdemo/function/map.mcfunction +12 -0
- package/dist/data/mathdemo/function/map__merge_1.mcfunction +11 -0
- package/dist/data/mathdemo/function/map__then_0.mcfunction +1 -0
- package/dist/data/mathdemo/function/mulfix.mcfunction +8 -0
- package/dist/data/mathdemo/function/neg2d_x.mcfunction +4 -0
- package/dist/data/mathdemo/function/neg2d_y.mcfunction +4 -0
- package/dist/data/mathdemo/function/neg3d_x.mcfunction +4 -0
- package/dist/data/mathdemo/function/neg3d_y.mcfunction +4 -0
- package/dist/data/mathdemo/function/neg3d_z.mcfunction +4 -0
- package/dist/data/mathdemo/function/normalize2d_x.mcfunction +11 -0
- package/dist/data/mathdemo/function/normalize2d_x__merge_1.mcfunction +6 -0
- package/dist/data/mathdemo/function/normalize2d_x__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/normalize2d_y.mcfunction +11 -0
- package/dist/data/mathdemo/function/normalize2d_y__merge_1.mcfunction +6 -0
- package/dist/data/mathdemo/function/normalize2d_y__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/pow_int.mcfunction +6 -0
- package/dist/data/mathdemo/function/pow_int__loop_body_4.mcfunction +7 -0
- package/dist/data/mathdemo/function/pow_int__loop_exit_5.mcfunction +1 -0
- package/dist/data/mathdemo/function/pow_int__loop_header_3.mcfunction +4 -0
- package/dist/data/mathdemo/function/pow_int__merge_1.mcfunction +4 -0
- package/dist/data/mathdemo/function/pow_int__merge_7.mcfunction +8 -0
- package/dist/data/mathdemo/function/pow_int__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/pow_int__then_6.mcfunction +4 -0
- package/dist/data/mathdemo/function/projectile_land_t.mcfunction +5 -0
- package/dist/data/mathdemo/function/projectile_land_t__merge_1.mcfunction +7 -0
- package/dist/data/mathdemo/function/projectile_land_t__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/projectile_max_height.mcfunction +10 -0
- package/dist/data/mathdemo/function/projectile_max_height__const_200.mcfunction +8 -0
- package/dist/data/mathdemo/function/projectile_vy.mcfunction +9 -0
- package/dist/data/mathdemo/function/projectile_x.mcfunction +8 -0
- package/dist/data/mathdemo/function/projectile_y.mcfunction +19 -0
- package/dist/data/mathdemo/function/quadratic_disc.mcfunction +12 -0
- package/dist/data/mathdemo/function/quadratic_x1.mcfunction +7 -0
- package/dist/data/mathdemo/function/quadratic_x1__merge_1.mcfunction +13 -0
- package/dist/data/mathdemo/function/quadratic_x1__merge_4.mcfunction +15 -0
- package/dist/data/mathdemo/function/quadratic_x1__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/quadratic_x1__then_3.mcfunction +2 -0
- package/dist/data/mathdemo/function/quadratic_x2.mcfunction +7 -0
- package/dist/data/mathdemo/function/quadratic_x2__merge_1.mcfunction +13 -0
- package/dist/data/mathdemo/function/quadratic_x2__merge_4.mcfunction +15 -0
- package/dist/data/mathdemo/function/quadratic_x2__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/quadratic_x2__then_3.mcfunction +2 -0
- package/dist/data/mathdemo/function/rotate2d_x.mcfunction +20 -0
- package/dist/data/mathdemo/function/rotate2d_y.mcfunction +20 -0
- package/dist/data/mathdemo/function/scale2d_x.mcfunction +8 -0
- package/dist/data/mathdemo/function/scale2d_y.mcfunction +8 -0
- package/dist/data/mathdemo/function/scale3d_x.mcfunction +8 -0
- package/dist/data/mathdemo/function/scale3d_y.mcfunction +8 -0
- package/dist/data/mathdemo/function/scale3d_z.mcfunction +8 -0
- package/dist/data/mathdemo/function/sign.mcfunction +5 -0
- package/dist/data/mathdemo/function/sign__merge_1.mcfunction +4 -0
- package/dist/data/mathdemo/function/sign__merge_4.mcfunction +2 -0
- package/dist/data/mathdemo/function/sign__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/sign__then_3.mcfunction +2 -0
- package/dist/data/mathdemo/function/sin_fixed.mcfunction +9 -0
- package/dist/data/mathdemo/function/sin_fixed__merge_1.mcfunction +4 -0
- package/dist/data/mathdemo/function/sin_fixed__merge_3.mcfunction +4 -0
- package/dist/data/mathdemo/function/sin_fixed__merge_6.mcfunction +4 -0
- package/dist/data/mathdemo/function/sin_fixed__merge_9.mcfunction +10 -0
- package/dist/data/mathdemo/function/sin_fixed__then_0.mcfunction +4 -0
- package/dist/data/mathdemo/function/sin_fixed__then_2.mcfunction +6 -0
- package/dist/data/mathdemo/function/sin_fixed__then_5.mcfunction +8 -0
- package/dist/data/mathdemo/function/sin_fixed__then_8.mcfunction +10 -0
- package/dist/data/mathdemo/function/smootherstep.mcfunction +10 -0
- package/dist/data/mathdemo/function/smootherstep__merge_1.mcfunction +12 -0
- package/dist/data/mathdemo/function/smootherstep__merge_4.mcfunction +4 -0
- package/dist/data/mathdemo/function/smootherstep__merge_6.mcfunction +27 -0
- package/dist/data/mathdemo/function/smootherstep__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/smootherstep__then_3.mcfunction +2 -0
- package/dist/data/mathdemo/function/smootherstep__then_5.mcfunction +2 -0
- package/dist/data/mathdemo/function/smoothstep.mcfunction +10 -0
- package/dist/data/mathdemo/function/smoothstep__merge_1.mcfunction +12 -0
- package/dist/data/mathdemo/function/smoothstep__merge_4.mcfunction +4 -0
- package/dist/data/mathdemo/function/smoothstep__merge_6.mcfunction +15 -0
- package/dist/data/mathdemo/function/smoothstep__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/smoothstep__then_3.mcfunction +2 -0
- package/dist/data/mathdemo/function/smoothstep__then_5.mcfunction +2 -0
- package/dist/data/mathdemo/function/solve2x2_x.mcfunction +17 -0
- package/dist/data/mathdemo/function/solve2x2_x__merge_1.mcfunction +12 -0
- package/dist/data/mathdemo/function/solve2x2_x__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/solve2x2_y.mcfunction +17 -0
- package/dist/data/mathdemo/function/solve2x2_y__merge_1.mcfunction +12 -0
- package/dist/data/mathdemo/function/solve2x2_y__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/spring_force.mcfunction +11 -0
- package/dist/data/mathdemo/function/spring_update_v.mcfunction +18 -0
- package/dist/data/mathdemo/function/sqrt_fixed.mcfunction +8 -0
- package/dist/data/mathdemo/function/sqrt_fx.mcfunction +11 -0
- package/dist/data/mathdemo/function/sqrt_fx__const_20000.mcfunction +8 -0
- package/dist/data/mathdemo/function/start.mcfunction +6 -0
- package/dist/data/mathdemo/function/sub2d_x.mcfunction +5 -0
- package/dist/data/mathdemo/function/sub2d_y.mcfunction +5 -0
- package/dist/data/mathdemo/function/sub3d_x.mcfunction +5 -0
- package/dist/data/mathdemo/function/sub3d_y.mcfunction +5 -0
- package/dist/data/mathdemo/function/sub3d_z.mcfunction +5 -0
- package/dist/data/mathdemo/function/terrain_height.mcfunction +24 -0
- package/dist/data/mathdemo/function/terrain_height__const_0_0_64_20.mcfunction +17 -0
- package/dist/data/mathdemo/function/terrain_height__const_10_5_64_20.mcfunction +17 -0
- package/dist/data/mathdemo/function/update_pos.mcfunction +5 -0
- package/dist/data/mathdemo/function/value_noise_1d.mcfunction +13 -0
- package/dist/data/mathdemo/function/value_noise_1d__merge_1.mcfunction +39 -0
- package/dist/data/mathdemo/function/value_noise_1d__then_0.mcfunction +7 -0
- package/dist/data/mathdemo/function/value_noise_2d.mcfunction +14 -0
- package/dist/data/mathdemo/function/value_noise_2d__merge_1.mcfunction +12 -0
- package/dist/data/mathdemo/function/value_noise_2d__merge_3.mcfunction +98 -0
- package/dist/data/mathdemo/function/value_noise_2d__then_0.mcfunction +7 -0
- package/dist/data/mathdemo/function/value_noise_2d__then_2.mcfunction +7 -0
- package/dist/data/mathdemo/function/water_drag_fx.mcfunction +2 -0
- package/dist/data/minecraft/tags/function/load.json +2 -1
- package/dist/data/minecraft/tags/function/tick.json +1 -1
- package/dist/data/test/function/__dyn_idx_test_arrays_a.mcfunction +1 -0
- package/dist/data/test/function/__dyn_idx_test_arrays_b.mcfunction +1 -0
- package/dist/data/test/function/__dyn_idx_test_arrays_c.mcfunction +1 -0
- package/dist/data/test/function/__dyn_idx_test_arrays_counter.mcfunction +1 -0
- package/dist/data/test/function/__dyn_idx_test_arrays_d.mcfunction +1 -0
- package/dist/data/test/function/__dyn_idx_test_arrays_e.mcfunction +1 -0
- package/dist/data/test/function/__dyn_idx_test_arrays_g.mcfunction +1 -0
- package/dist/data/test/function/__dyn_idx_test_arrays_h.mcfunction +1 -0
- package/dist/data/test/function/__dyn_idx_test_arrays_one.mcfunction +1 -0
- package/dist/data/test/function/__dyn_wrt_test_arrays_f.mcfunction +1 -0
- package/dist/data/test/function/__dyn_wrt_test_arrays_r.mcfunction +1 -0
- package/dist/data/test/function/__dyn_wrt_test_arrays_s.mcfunction +1 -0
- package/dist/data/test/function/_apply.mcfunction +5 -0
- package/dist/data/test/function/_divider.mcfunction +1 -0
- package/dist/data/test/function/_dump_advanced_phase.mcfunction +4 -0
- package/dist/data/test/function/_dump_advanced_phase__loop_body_1.mcfunction +7 -0
- package/dist/data/test/function/_dump_advanced_phase__loop_body_6.mcfunction +10 -0
- package/dist/data/test/function/_dump_advanced_phase__loop_exit_2.mcfunction +20 -0
- package/dist/data/test/function/_dump_advanced_phase__loop_exit_7.mcfunction +12 -0
- package/dist/data/test/function/_dump_advanced_phase__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/_dump_advanced_phase__loop_header_5.mcfunction +4 -0
- package/dist/data/test/function/_dump_advanced_phase__merge_4.mcfunction +4 -0
- package/dist/data/test/function/_dump_advanced_phase__then_3.mcfunction +2 -0
- package/dist/data/test/function/_dump_bigint_phase.mcfunction +28 -0
- package/dist/data/test/function/_dump_math_phase.mcfunction +4 -0
- package/dist/data/test/function/_dump_math_phase__loop_body_1.mcfunction +9 -0
- package/dist/data/test/function/_dump_math_phase__loop_exit_2.mcfunction +18 -0
- package/dist/data/test/function/_dump_math_phase__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/_fp.mcfunction +2 -0
- package/dist/data/test/function/_next_phase.mcfunction +1 -0
- package/dist/data/test/function/_section.mcfunction +3 -0
- package/dist/data/test/function/_section__const_0.mcfunction +3 -0
- package/dist/data/test/function/_tick_advanced_live.mcfunction +5 -0
- package/dist/data/test/function/_tick_advanced_live__foreach_t12.mcfunction +1 -0
- package/dist/data/test/function/_tick_bigint_live.mcfunction +8 -0
- package/dist/data/test/function/_tick_bigint_live__foreach_t11.mcfunction +1 -0
- package/dist/data/test/function/_tick_math.mcfunction +9 -0
- package/dist/data/test/function/_tick_math__foreach_t12.mcfunction +1 -0
- package/dist/data/test/function/_tick_visual.mcfunction +11 -0
- package/dist/data/test/function/_tick_visual__foreach_t12.mcfunction +1 -0
- package/dist/data/test/function/_tick_visual__foreach_t16.mcfunction +8 -0
- package/dist/data/test/function/_tick_visual__foreach_t17.mcfunction +8 -0
- package/dist/data/test/function/_tick_visual__foreach_t21.mcfunction +1 -0
- package/dist/data/test/function/air_drag_fx.mcfunction +2 -0
- package/dist/data/test/function/angle_between.mcfunction +28 -0
- package/dist/data/test/function/angle_between__and_false_2.mcfunction +2 -0
- package/dist/data/test/function/angle_between__and_false_8.mcfunction +2 -0
- package/dist/data/test/function/angle_between__and_merge_1.mcfunction +2 -0
- package/dist/data/test/function/angle_between__and_merge_7.mcfunction +2 -0
- package/dist/data/test/function/angle_between__and_right_0.mcfunction +4 -0
- package/dist/data/test/function/angle_between__and_right_6.mcfunction +4 -0
- package/dist/data/test/function/angle_between__merge_10.mcfunction +26 -0
- package/dist/data/test/function/angle_between__merge_4.mcfunction +4 -0
- package/dist/data/test/function/angle_between__then_3.mcfunction +2 -0
- package/dist/data/test/function/angle_between__then_9.mcfunction +2 -0
- package/dist/data/test/function/apply_drag.mcfunction +8 -0
- package/dist/data/test/function/apply_gravity.mcfunction +6 -0
- package/dist/data/test/function/approx_eq.mcfunction +1 -2
- package/dist/data/test/function/approx_eq__merge_1.mcfunction +1 -2
- package/dist/data/test/function/atan2_fixed.mcfunction +1 -2
- package/dist/data/test/function/atan2_fixed__loop_body_26.mcfunction +1 -2
- package/dist/data/test/function/atan2_fixed__loop_exit_27.mcfunction +1 -2
- package/dist/data/test/function/atan2_fixed__loop_header_25.mcfunction +1 -2
- package/dist/data/test/function/atan2_fixed__merge_1.mcfunction +1 -2
- package/dist/data/test/function/atan2_fixed__merge_10.mcfunction +1 -2
- package/dist/data/test/function/atan2_fixed__merge_16.mcfunction +1 -2
- package/dist/data/test/function/atan2_fixed__merge_18.mcfunction +1 -2
- package/dist/data/test/function/atan2_fixed__merge_20.mcfunction +1 -2
- package/dist/data/test/function/atan2_fixed__merge_22.mcfunction +1 -2
- package/dist/data/test/function/atan2_fixed__merge_3.mcfunction +1 -2
- package/dist/data/test/function/atan2_fixed__merge_32.mcfunction +1 -2
- package/dist/data/test/function/atan2_fixed__merge_34.mcfunction +1 -2
- package/dist/data/test/function/atan2_fixed__then_0.mcfunction +1 -2
- package/dist/data/test/function/atan2_fixed__then_33.mcfunction +1 -2
- package/dist/data/test/function/atan2_fixed__then_9.mcfunction +1 -2
- package/dist/data/test/function/bezier_cubic.mcfunction +36 -0
- package/dist/data/test/function/bezier_quad.mcfunction +20 -0
- package/dist/data/test/function/bigint3_borrow_lo.mcfunction +1 -2
- package/dist/data/test/function/bigint3_borrow_mid.mcfunction +1 -2
- package/dist/data/test/function/bigint3_cmp.mcfunction +1 -2
- package/dist/data/test/function/bigint3_cmp__merge_1.mcfunction +1 -2
- package/dist/data/test/function/bigint3_cmp__merge_10.mcfunction +1 -2
- package/dist/data/test/function/bigint3_cmp__merge_13.mcfunction +1 -2
- package/dist/data/test/function/bigint3_cmp__merge_4.mcfunction +1 -2
- package/dist/data/test/function/bigint3_cmp__merge_7.mcfunction +1 -2
- package/dist/data/test/function/bigint3_sub_lo.mcfunction +1 -2
- package/dist/data/test/function/bigint3_sub_mid.mcfunction +1 -2
- package/dist/data/test/function/bigint_add.mcfunction +8 -0
- package/dist/data/test/function/bigint_add__arr_a__test_arrays__a__b__test_arrays__b__result__test_arrays__r.mcfunction +6 -0
- package/dist/data/test/function/bigint_add__arr_a__test_arrays__a__b__test_arrays__b__result__test_arrays__r__loop_body_1.mcfunction +22 -0
- package/dist/data/test/function/bigint_add__arr_a__test_arrays__a__b__test_arrays__b__result__test_arrays__r__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/bigint_add__arr_a__test_arrays__a__b__test_arrays__b__result__test_arrays__r__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/bigint_add__arr_a__test_arrays__counter__b__test_arrays__one__result__test_arrays__r.mcfunction +6 -0
- package/dist/data/test/function/bigint_add__arr_a__test_arrays__counter__b__test_arrays__one__result__test_arrays__r__loop_body_1.mcfunction +22 -0
- package/dist/data/test/function/bigint_add__arr_a__test_arrays__counter__b__test_arrays__one__result__test_arrays__r__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/bigint_add__arr_a__test_arrays__counter__b__test_arrays__one__result__test_arrays__r__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/bigint_add__loop_body_1.mcfunction +12 -0
- package/dist/data/test/function/bigint_add__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/bigint_add__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/bigint_cmp.mcfunction +5 -0
- package/dist/data/test/function/bigint_cmp__arr_a__test_arrays__g__b__test_arrays__h.mcfunction +3 -0
- package/dist/data/test/function/bigint_cmp__arr_a__test_arrays__g__b__test_arrays__h__loop_body_1.mcfunction +7 -0
- package/dist/data/test/function/bigint_cmp__arr_a__test_arrays__g__b__test_arrays__h__loop_exit_2.mcfunction +2 -0
- package/dist/data/test/function/bigint_cmp__arr_a__test_arrays__g__b__test_arrays__h__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/bigint_cmp__arr_a__test_arrays__g__b__test_arrays__h__merge_4.mcfunction +7 -0
- package/dist/data/test/function/bigint_cmp__arr_a__test_arrays__g__b__test_arrays__h__merge_7.mcfunction +4 -0
- package/dist/data/test/function/bigint_cmp__arr_a__test_arrays__g__b__test_arrays__h__then_3.mcfunction +2 -0
- package/dist/data/test/function/bigint_cmp__arr_a__test_arrays__g__b__test_arrays__h__then_6.mcfunction +2 -0
- package/dist/data/test/function/bigint_cmp__loop_body_1.mcfunction +3 -0
- package/dist/data/test/function/bigint_cmp__loop_exit_2.mcfunction +2 -0
- package/dist/data/test/function/bigint_cmp__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/bigint_cmp__merge_4.mcfunction +3 -0
- package/dist/data/test/function/bigint_cmp__merge_7.mcfunction +4 -0
- package/dist/data/test/function/bigint_cmp__then_3.mcfunction +2 -0
- package/dist/data/test/function/bigint_cmp__then_6.mcfunction +2 -0
- package/dist/data/test/function/bigint_copy.mcfunction +3 -0
- package/dist/data/test/function/bigint_copy__loop_body_1.mcfunction +4 -0
- package/dist/data/test/function/bigint_copy__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/bigint_copy__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/bigint_is_zero.mcfunction +4 -0
- package/dist/data/test/function/bigint_is_zero__loop_body_1.mcfunction +4 -0
- package/dist/data/test/function/bigint_is_zero__loop_exit_2.mcfunction +2 -0
- package/dist/data/test/function/bigint_is_zero__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/bigint_is_zero__merge_4.mcfunction +4 -0
- package/dist/data/test/function/bigint_is_zero__then_3.mcfunction +2 -0
- package/dist/data/test/function/bigint_leading_zeros.mcfunction +5 -0
- package/dist/data/test/function/bigint_leading_zeros__loop_body_1.mcfunction +4 -0
- package/dist/data/test/function/bigint_leading_zeros__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/bigint_leading_zeros__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/bigint_leading_zeros__merge_4.mcfunction +9 -0
- package/dist/data/test/function/bigint_leading_zeros__then_3.mcfunction +1 -0
- package/dist/data/test/function/bigint_mul_small.mcfunction +8 -0
- package/dist/data/test/function/bigint_mul_small__arr_a__test_arrays__e__result__test_arrays__f.mcfunction +7 -0
- package/dist/data/test/function/bigint_mul_small__arr_a__test_arrays__e__result__test_arrays__f__loop_body_1.mcfunction +20 -0
- package/dist/data/test/function/bigint_mul_small__arr_a__test_arrays__e__result__test_arrays__f__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/bigint_mul_small__arr_a__test_arrays__e__result__test_arrays__f__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/bigint_mul_small__loop_body_1.mcfunction +12 -0
- package/dist/data/test/function/bigint_mul_small__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/bigint_mul_small__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/bigint_shift_left.mcfunction +3 -0
- package/dist/data/test/function/bigint_shift_left__loop_body_1.mcfunction +4 -0
- package/dist/data/test/function/bigint_shift_left__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/bigint_shift_left__loop_header_0.mcfunction +5 -0
- package/dist/data/test/function/bigint_sub.mcfunction +8 -0
- package/dist/data/test/function/bigint_sub__arr_a__test_arrays__c__b__test_arrays__d__result__test_arrays__s.mcfunction +6 -0
- package/dist/data/test/function/bigint_sub__arr_a__test_arrays__c__b__test_arrays__d__result__test_arrays__s__loop_body_1.mcfunction +13 -0
- package/dist/data/test/function/bigint_sub__arr_a__test_arrays__c__b__test_arrays__d__result__test_arrays__s__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/bigint_sub__arr_a__test_arrays__c__b__test_arrays__d__result__test_arrays__s__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/bigint_sub__arr_a__test_arrays__c__b__test_arrays__d__result__test_arrays__s__merge_4.mcfunction +4 -0
- package/dist/data/test/function/bigint_sub__arr_a__test_arrays__c__b__test_arrays__d__result__test_arrays__s__merge_6.mcfunction +7 -0
- package/dist/data/test/function/bigint_sub__arr_a__test_arrays__c__b__test_arrays__d__result__test_arrays__s__then_3.mcfunction +5 -0
- package/dist/data/test/function/bigint_sub__arr_a__test_arrays__c__b__test_arrays__d__result__test_arrays__s__then_5.mcfunction +2 -0
- package/dist/data/test/function/bigint_sub__loop_body_1.mcfunction +9 -0
- package/dist/data/test/function/bigint_sub__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/bigint_sub__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/bigint_sub__merge_4.mcfunction +4 -0
- package/dist/data/test/function/bigint_sub__merge_6.mcfunction +4 -0
- package/dist/data/test/function/bigint_sub__then_3.mcfunction +5 -0
- package/dist/data/test/function/bigint_sub__then_5.mcfunction +2 -0
- package/dist/data/test/function/bigint_zero.mcfunction +3 -0
- package/dist/data/test/function/bigint_zero__loop_body_1.mcfunction +4 -0
- package/dist/data/test/function/bigint_zero__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/bigint_zero__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/billboard_y.mcfunction +7 -0
- package/dist/data/test/function/bounce_v.mcfunction +10 -0
- package/dist/data/test/function/cbrt_fx.mcfunction +1 -2
- package/dist/data/test/function/cbrt_fx__loop_body_6.mcfunction +1 -2
- package/dist/data/test/function/cbrt_fx__loop_header_5.mcfunction +1 -2
- package/dist/data/test/function/cbrt_fx__merge_1.mcfunction +1 -2
- package/dist/data/test/function/cbrt_fx__merge_11.mcfunction +1 -2
- package/dist/data/test/function/cbrt_fx__merge_9.mcfunction +1 -2
- package/dist/data/test/function/chebyshev.mcfunction +1 -2
- package/dist/data/test/function/chebyshev3d.mcfunction +1 -2
- package/dist/data/test/function/chebyshev3d__merge_1.mcfunction +1 -2
- package/dist/data/test/function/chebyshev3d__merge_3.mcfunction +1 -2
- package/dist/data/test/function/chebyshev3d__merge_5.mcfunction +1 -2
- package/dist/data/test/function/chebyshev3d__merge_7.mcfunction +1 -2
- package/dist/data/test/function/chebyshev__merge_1.mcfunction +1 -2
- package/dist/data/test/function/chebyshev__merge_3.mcfunction +1 -2
- package/dist/data/test/function/circular_x.mcfunction +14 -0
- package/dist/data/test/function/circular_z.mcfunction +14 -0
- package/dist/data/test/function/clamp_circle_x.mcfunction +13 -0
- package/dist/data/test/function/clamp_circle_x__merge_1.mcfunction +10 -0
- package/dist/data/test/function/clamp_circle_x__then_0.mcfunction +1 -0
- package/dist/data/test/function/clamp_circle_y.mcfunction +13 -0
- package/dist/data/test/function/clamp_circle_y__merge_1.mcfunction +10 -0
- package/dist/data/test/function/clamp_circle_y__then_0.mcfunction +1 -0
- package/dist/data/test/function/clamp_velocity.mcfunction +5 -0
- package/dist/data/test/function/clamp_velocity__merge_1.mcfunction +5 -0
- package/dist/data/test/function/clamp_velocity__merge_4.mcfunction +1 -0
- package/dist/data/test/function/clamp_velocity__then_0.mcfunction +1 -0
- package/dist/data/test/function/clamp_velocity__then_3.mcfunction +3 -0
- package/dist/data/test/function/collatz_steps.mcfunction +5 -0
- package/dist/data/test/function/collatz_steps__else_8.mcfunction +6 -0
- package/dist/data/test/function/collatz_steps__loop_body_4.mcfunction +7 -0
- package/dist/data/test/function/collatz_steps__loop_exit_5.mcfunction +1 -0
- package/dist/data/test/function/collatz_steps__loop_header_3.mcfunction +4 -0
- package/dist/data/test/function/collatz_steps__merge_1.mcfunction +3 -0
- package/dist/data/test/function/collatz_steps__merge_7.mcfunction +4 -0
- package/dist/data/test/function/collatz_steps__then_0.mcfunction +2 -0
- package/dist/data/test/function/collatz_steps__then_6.mcfunction +5 -0
- package/dist/data/test/function/combinations.mcfunction +1 -2
- package/dist/data/test/function/combinations__loop_header_8.mcfunction +1 -2
- package/dist/data/test/function/combinations__merge_1.mcfunction +1 -2
- package/dist/data/test/function/combinations__merge_4.mcfunction +1 -2
- package/dist/data/test/function/cos_fixed__const_0.mcfunction +5 -0
- package/dist/data/test/function/count_digits.mcfunction +6 -0
- package/dist/data/test/function/count_digits__loop_body_6.mcfunction +8 -0
- package/dist/data/test/function/count_digits__loop_exit_7.mcfunction +1 -0
- package/dist/data/test/function/count_digits__loop_header_5.mcfunction +4 -0
- package/dist/data/test/function/count_digits__merge_1.mcfunction +4 -0
- package/dist/data/test/function/count_digits__merge_3.mcfunction +2 -0
- package/dist/data/test/function/count_digits__then_0.mcfunction +4 -0
- package/dist/data/test/function/count_digits__then_2.mcfunction +2 -0
- package/dist/data/test/function/debug_bigint.mcfunction +25 -0
- package/dist/data/test/function/digit_sum.mcfunction +6 -0
- package/dist/data/test/function/digit_sum__loop_body_6.mcfunction +11 -0
- package/dist/data/test/function/digit_sum__loop_exit_7.mcfunction +1 -0
- package/dist/data/test/function/digit_sum__loop_header_5.mcfunction +4 -0
- package/dist/data/test/function/digit_sum__merge_1.mcfunction +4 -0
- package/dist/data/test/function/digit_sum__merge_3.mcfunction +2 -0
- package/dist/data/test/function/digit_sum__then_0.mcfunction +4 -0
- package/dist/data/test/function/digit_sum__then_2.mcfunction +2 -0
- package/dist/data/test/function/digital_root.mcfunction +5 -0
- package/dist/data/test/function/digital_root__merge_1.mcfunction +8 -0
- package/dist/data/test/function/digital_root__merge_4.mcfunction +1 -0
- package/dist/data/test/function/digital_root__then_0.mcfunction +2 -0
- package/dist/data/test/function/digital_root__then_3.mcfunction +2 -0
- package/dist/data/test/function/divfix.mcfunction +1 -2
- package/dist/data/test/function/dump_advanced.mcfunction +1 -0
- package/dist/data/test/function/dump_bigint.mcfunction +1 -0
- package/dist/data/test/function/dump_math.mcfunction +1 -0
- package/dist/data/test/function/ease_in_back.mcfunction +26 -0
- package/dist/data/test/function/ease_in_bounce.mcfunction +9 -0
- package/dist/data/test/function/ease_in_cubic.mcfunction +12 -0
- package/dist/data/test/function/ease_in_expo.mcfunction +6 -0
- package/dist/data/test/function/ease_in_expo__merge_1.mcfunction +11 -0
- package/dist/data/test/function/ease_in_expo__then_0.mcfunction +2 -0
- package/dist/data/test/function/ease_in_out_back.mcfunction +6 -0
- package/dist/data/test/function/ease_in_out_back__merge_1.mcfunction +14 -0
- package/dist/data/test/function/ease_in_out_back__then_0.mcfunction +10 -0
- package/dist/data/test/function/ease_in_out_bounce.mcfunction +6 -0
- package/dist/data/test/function/ease_in_out_bounce__merge_1.mcfunction +14 -0
- package/dist/data/test/function/ease_in_out_bounce__then_0.mcfunction +10 -0
- package/dist/data/test/function/ease_in_out_cubic.mcfunction +6 -0
- package/dist/data/test/function/ease_in_out_cubic__merge_1.mcfunction +17 -0
- package/dist/data/test/function/ease_in_out_cubic__then_0.mcfunction +13 -0
- package/dist/data/test/function/ease_in_out_quad.mcfunction +6 -0
- package/dist/data/test/function/ease_in_out_quad__merge_1.mcfunction +12 -0
- package/dist/data/test/function/ease_in_out_quad__then_0.mcfunction +8 -0
- package/dist/data/test/function/ease_in_out_sine.mcfunction +6 -0
- package/dist/data/test/function/ease_in_out_sine__merge_1.mcfunction +14 -0
- package/dist/data/test/function/ease_in_out_sine__then_0.mcfunction +10 -0
- package/dist/data/test/function/ease_in_quad.mcfunction +7 -0
- package/dist/data/test/function/ease_in_quart.mcfunction +12 -0
- package/dist/data/test/function/ease_in_sine.mcfunction +30 -0
- package/dist/data/test/function/ease_linear.mcfunction +2 -0
- package/dist/data/test/function/ease_out_back.mcfunction +9 -0
- package/dist/data/test/function/ease_out_bounce.mcfunction +7 -0
- package/dist/data/test/function/ease_out_bounce__merge_1.mcfunction +5 -0
- package/dist/data/test/function/ease_out_bounce__merge_4.mcfunction +5 -0
- package/dist/data/test/function/ease_out_bounce__merge_7.mcfunction +15 -0
- package/dist/data/test/function/ease_out_bounce__then_0.mcfunction +11 -0
- package/dist/data/test/function/ease_out_bounce__then_3.mcfunction +15 -0
- package/dist/data/test/function/ease_out_bounce__then_6.mcfunction +15 -0
- package/dist/data/test/function/ease_out_cubic.mcfunction +16 -0
- package/dist/data/test/function/ease_out_expo.mcfunction +6 -0
- package/dist/data/test/function/ease_out_expo__merge_1.mcfunction +8 -0
- package/dist/data/test/function/ease_out_expo__then_0.mcfunction +2 -0
- package/dist/data/test/function/ease_out_quad.mcfunction +11 -0
- package/dist/data/test/function/ease_out_quart.mcfunction +16 -0
- package/dist/data/test/function/ease_out_sine.mcfunction +9 -0
- package/dist/data/test/function/ease_smooth.mcfunction +23 -0
- package/dist/data/test/function/ease_smoother.mcfunction +41 -0
- package/dist/data/test/function/exp_fx.mcfunction +1 -2
- package/dist/data/test/function/exp_fx__loop_header_4.mcfunction +1 -2
- package/dist/data/test/function/exp_fx__loop_header_9.mcfunction +1 -2
- package/dist/data/test/function/exp_fx__merge_1.mcfunction +1 -2
- package/dist/data/test/function/exp_fx__merge_3.mcfunction +1 -2
- package/dist/data/test/function/factorial.mcfunction +1 -2
- package/dist/data/test/function/factorial__loop_header_3.mcfunction +1 -2
- package/dist/data/test/function/fbm_1d.mcfunction +9 -0
- package/dist/data/test/function/fbm_1d__loop_body_1.mcfunction +33 -0
- package/dist/data/test/function/fbm_1d__loop_exit_2.mcfunction +5 -0
- package/dist/data/test/function/fbm_1d__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/fbm_1d__merge_4.mcfunction +6 -0
- package/dist/data/test/function/fbm_1d__then_3.mcfunction +2 -0
- package/dist/data/test/function/fbm_2d.mcfunction +10 -0
- package/dist/data/test/function/fbm_2d__loop_body_1.mcfunction +39 -0
- package/dist/data/test/function/fbm_2d__loop_exit_2.mcfunction +5 -0
- package/dist/data/test/function/fbm_2d__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/fbm_2d__merge_4.mcfunction +6 -0
- package/dist/data/test/function/fbm_2d__then_3.mcfunction +2 -0
- package/dist/data/test/function/fib.mcfunction +5 -0
- package/dist/data/test/function/fib__loop_body_7.mcfunction +8 -0
- package/dist/data/test/function/fib__loop_exit_8.mcfunction +1 -0
- package/dist/data/test/function/fib__loop_header_6.mcfunction +3 -0
- package/dist/data/test/function/fib__merge_1.mcfunction +4 -0
- package/dist/data/test/function/fib__merge_4.mcfunction +4 -0
- package/dist/data/test/function/fib__then_0.mcfunction +2 -0
- package/dist/data/test/function/fib__then_3.mcfunction +2 -0
- package/dist/data/test/function/friction_decel.mcfunction +5 -0
- package/dist/data/test/function/friction_decel__merge_1.mcfunction +5 -0
- package/dist/data/test/function/friction_decel__merge_4.mcfunction +2 -0
- package/dist/data/test/function/friction_decel__then_0.mcfunction +3 -0
- package/dist/data/test/function/friction_decel__then_3.mcfunction +3 -0
- package/dist/data/test/function/gamma_int.mcfunction +1 -2
- package/dist/data/test/function/gcd.mcfunction +1 -2
- package/dist/data/test/function/gcd__loop_header_4.mcfunction +1 -2
- package/dist/data/test/function/gcd__merge_1.mcfunction +1 -2
- package/dist/data/test/function/gravity_fx.mcfunction +2 -0
- package/dist/data/test/function/hash_1d.mcfunction +15 -0
- package/dist/data/test/function/hash_1d_pos.mcfunction +10 -0
- package/dist/data/test/function/hash_1d_pos__merge_1.mcfunction +4 -0
- package/dist/data/test/function/hash_1d_pos__then_0.mcfunction +4 -0
- package/dist/data/test/function/hash_2d.mcfunction +11 -0
- package/dist/data/test/function/hash_2d_pos.mcfunction +12 -0
- package/dist/data/test/function/hash_2d_pos__merge_1.mcfunction +4 -0
- package/dist/data/test/function/hash_2d_pos__then_0.mcfunction +4 -0
- package/dist/data/test/function/hash_int.mcfunction +6 -0
- package/dist/data/test/function/hash_int__merge_1.mcfunction +14 -0
- package/dist/data/test/function/hash_int__merge_3.mcfunction +14 -0
- package/dist/data/test/function/hash_int__merge_5.mcfunction +1 -0
- package/dist/data/test/function/hash_int__then_0.mcfunction +4 -0
- package/dist/data/test/function/hash_int__then_2.mcfunction +4 -0
- package/dist/data/test/function/hash_int__then_4.mcfunction +4 -0
- package/dist/data/test/function/impact_velocity.mcfunction +5 -0
- package/dist/data/test/function/impact_velocity__merge_1.mcfunction +16 -0
- package/dist/data/test/function/impact_velocity__then_0.mcfunction +2 -0
- package/dist/data/test/function/int32_to_bigint3_hi.mcfunction +1 -2
- package/dist/data/test/function/int32_to_bigint3_lo.mcfunction +1 -2
- package/dist/data/test/function/int32_to_bigint3_mid.mcfunction +1 -2
- package/dist/data/test/function/is_grounded.mcfunction +5 -0
- package/dist/data/test/function/is_grounded__merge_1.mcfunction +2 -0
- package/dist/data/test/function/is_grounded__then_0.mcfunction +2 -0
- package/dist/data/test/function/is_prime.mcfunction +5 -0
- package/dist/data/test/function/is_prime__loop_body_10.mcfunction +6 -0
- package/dist/data/test/function/is_prime__loop_exit_11.mcfunction +2 -0
- package/dist/data/test/function/is_prime__loop_header_9.mcfunction +5 -0
- package/dist/data/test/function/is_prime__merge_1.mcfunction +4 -0
- package/dist/data/test/function/is_prime__merge_13.mcfunction +4 -0
- package/dist/data/test/function/is_prime__merge_4.mcfunction +7 -0
- package/dist/data/test/function/is_prime__merge_7.mcfunction +2 -0
- package/dist/data/test/function/is_prime__then_0.mcfunction +2 -0
- package/dist/data/test/function/is_prime__then_12.mcfunction +2 -0
- package/dist/data/test/function/is_prime__then_3.mcfunction +2 -0
- package/dist/data/test/function/is_prime__then_6.mcfunction +2 -0
- package/dist/data/test/function/isqrt.mcfunction +1 -2
- package/dist/data/test/function/isqrt__loop_body_13.mcfunction +1 -2
- package/dist/data/test/function/isqrt__loop_header_12.mcfunction +1 -2
- package/dist/data/test/function/isqrt__loop_header_6.mcfunction +1 -2
- package/dist/data/test/function/isqrt__loop_header_9.mcfunction +1 -2
- package/dist/data/test/function/isqrt__merge_1.mcfunction +1 -2
- package/dist/data/test/function/julia_iter.mcfunction +9 -0
- package/dist/data/test/function/julia_iter__loop_body_1.mcfunction +36 -0
- package/dist/data/test/function/julia_iter__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/julia_iter__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/julia_iter__merge_4.mcfunction +4 -0
- package/dist/data/test/function/julia_iter__then_3.mcfunction +1 -0
- package/dist/data/test/function/lambda_demo.mcfunction +2 -0
- package/dist/data/test/function/lcm.mcfunction +1 -2
- package/dist/data/test/function/lerp_angle.mcfunction +7 -0
- package/dist/data/test/function/lerp_angle__loop_body_1.mcfunction +4 -0
- package/dist/data/test/function/lerp_angle__loop_body_4.mcfunction +4 -0
- package/dist/data/test/function/lerp_angle__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/lerp_angle__loop_exit_5.mcfunction +8 -0
- package/dist/data/test/function/lerp_angle__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/lerp_angle__loop_header_3.mcfunction +3 -0
- package/dist/data/test/function/ln__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/ln__loop_header_3.mcfunction +1 -2
- package/dist/data/test/function/log2_int.mcfunction +1 -2
- package/dist/data/test/function/log2_int__loop_header_3.mcfunction +1 -2
- package/dist/data/test/function/loga_fx.mcfunction +1 -2
- package/dist/data/test/function/mandelbrot_iter.mcfunction +7 -0
- package/dist/data/test/function/mandelbrot_iter__loop_body_1.mcfunction +36 -0
- package/dist/data/test/function/mandelbrot_iter__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/mandelbrot_iter__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/mandelbrot_iter__merge_4.mcfunction +4 -0
- package/dist/data/test/function/mandelbrot_iter__then_3.mcfunction +1 -0
- package/dist/data/test/function/manhattan.mcfunction +1 -2
- package/dist/data/test/function/manhattan3d.mcfunction +1 -2
- package/dist/data/test/function/manhattan3d__merge_1.mcfunction +1 -2
- package/dist/data/test/function/manhattan3d__merge_3.mcfunction +1 -2
- package/dist/data/test/function/manhattan__merge_1.mcfunction +1 -2
- package/dist/data/test/function/map.mcfunction +1 -2
- package/dist/data/test/function/mod_pow.mcfunction +7 -0
- package/dist/data/test/function/mod_pow__loop_body_6.mcfunction +7 -0
- package/dist/data/test/function/mod_pow__loop_exit_7.mcfunction +1 -0
- package/dist/data/test/function/mod_pow__loop_header_5.mcfunction +4 -0
- package/dist/data/test/function/mod_pow__merge_1.mcfunction +8 -0
- package/dist/data/test/function/mod_pow__merge_4.mcfunction +2 -0
- package/dist/data/test/function/mod_pow__merge_9.mcfunction +10 -0
- package/dist/data/test/function/mod_pow__then_0.mcfunction +2 -0
- package/dist/data/test/function/mod_pow__then_3.mcfunction +4 -0
- package/dist/data/test/function/mod_pow__then_8.mcfunction +6 -0
- package/dist/data/test/function/newton_sqrt.mcfunction +5 -0
- package/dist/data/test/function/newton_sqrt__loop_body_7.mcfunction +10 -0
- package/dist/data/test/function/newton_sqrt__loop_exit_8.mcfunction +1 -0
- package/dist/data/test/function/newton_sqrt__loop_header_6.mcfunction +3 -0
- package/dist/data/test/function/newton_sqrt__merge_1.mcfunction +4 -0
- package/dist/data/test/function/newton_sqrt__merge_4.mcfunction +6 -0
- package/dist/data/test/function/newton_sqrt__then_0.mcfunction +2 -0
- package/dist/data/test/function/newton_sqrt__then_3.mcfunction +2 -0
- package/dist/data/test/function/noise1d.mcfunction +13 -0
- package/dist/data/test/function/noise1d__merge_1.mcfunction +20 -0
- package/dist/data/test/function/noise1d__merge_3.mcfunction +4 -0
- package/dist/data/test/function/noise1d__merge_5.mcfunction +11 -0
- package/dist/data/test/function/noise1d__then_0.mcfunction +7 -0
- package/dist/data/test/function/noise1d__then_2.mcfunction +4 -0
- package/dist/data/test/function/noise1d__then_4.mcfunction +4 -0
- package/dist/data/test/function/normalize2d_x.mcfunction +1 -2
- package/dist/data/test/function/normalize2d_y.mcfunction +1 -2
- package/dist/data/test/function/pow_int.mcfunction +1 -2
- package/dist/data/test/function/pow_int__loop_body_4.mcfunction +1 -2
- package/dist/data/test/function/pow_int__loop_header_3.mcfunction +1 -2
- package/dist/data/test/function/projectile_land_t.mcfunction +5 -0
- package/dist/data/test/function/projectile_land_t__merge_1.mcfunction +7 -0
- package/dist/data/test/function/projectile_land_t__then_0.mcfunction +2 -0
- package/dist/data/test/function/projectile_max_height.mcfunction +10 -0
- package/dist/data/test/function/projectile_vy.mcfunction +9 -0
- package/dist/data/test/function/projectile_x.mcfunction +8 -0
- package/dist/data/test/function/projectile_y.mcfunction +19 -0
- package/dist/data/test/function/ptimer/new.mcfunction +3 -0
- package/dist/data/test/function/ptimer/reset.mcfunction +1 -0
- package/dist/data/test/function/ptimer/tick.mcfunction +8 -0
- package/dist/data/test/function/ptimer/tick__merge_1.mcfunction +2 -0
- package/dist/data/test/function/ptimer/tick__then_0.mcfunction +3 -0
- package/dist/data/test/function/quadratic_x1.mcfunction +1 -2
- package/dist/data/test/function/quadratic_x1__merge_1.mcfunction +1 -2
- package/dist/data/test/function/quadratic_x2.mcfunction +1 -2
- package/dist/data/test/function/quadratic_x2__merge_1.mcfunction +1 -2
- package/dist/data/test/function/quat_cos_half.mcfunction +8 -0
- package/dist/data/test/function/quat_sin_half.mcfunction +8 -0
- package/dist/data/test/function/reverse_int.mcfunction +7 -0
- package/dist/data/test/function/reverse_int__loop_body_3.mcfunction +14 -0
- package/dist/data/test/function/reverse_int__loop_exit_4.mcfunction +4 -0
- package/dist/data/test/function/reverse_int__loop_header_2.mcfunction +4 -0
- package/dist/data/test/function/reverse_int__merge_1.mcfunction +2 -0
- package/dist/data/test/function/reverse_int__merge_6.mcfunction +1 -0
- package/dist/data/test/function/reverse_int__then_0.mcfunction +5 -0
- package/dist/data/test/function/reverse_int__then_5.mcfunction +3 -0
- package/dist/data/test/function/rotate_x_y.mcfunction +28 -0
- package/dist/data/test/function/rotate_x_z.mcfunction +28 -0
- package/dist/data/test/function/rotate_y_x.mcfunction +28 -0
- package/dist/data/test/function/rotate_y_z.mcfunction +30 -0
- package/dist/data/test/function/scale_x.mcfunction +8 -0
- package/dist/data/test/function/scale_y.mcfunction +8 -0
- package/dist/data/test/function/scale_z.mcfunction +8 -0
- package/dist/data/test/function/showcase_load.mcfunction +4 -0
- package/dist/data/test/function/showcase_tick.mcfunction +1 -0
- package/dist/data/test/function/sign.mcfunction +1 -2
- package/dist/data/test/function/sign__merge_1.mcfunction +1 -2
- package/dist/data/test/function/sin_fixed.mcfunction +1 -2
- package/dist/data/test/function/sin_fixed__merge_1.mcfunction +1 -2
- package/dist/data/test/function/sin_fixed__merge_3.mcfunction +1 -2
- package/dist/data/test/function/sin_fixed__merge_6.mcfunction +1 -2
- package/dist/data/test/function/smootherstep.mcfunction +1 -2
- package/dist/data/test/function/smootherstep__merge_1.mcfunction +1 -2
- package/dist/data/test/function/smootherstep__merge_4.mcfunction +1 -2
- package/dist/data/test/function/smoothstep.mcfunction +1 -2
- package/dist/data/test/function/smoothstep__merge_1.mcfunction +1 -2
- package/dist/data/test/function/smoothstep__merge_4.mcfunction +1 -2
- package/dist/data/test/function/solve2x2_x.mcfunction +1 -2
- package/dist/data/test/function/solve2x2_y.mcfunction +1 -2
- package/dist/data/test/function/spiral_ring.mcfunction +5 -0
- package/dist/data/test/function/spiral_ring__merge_1.mcfunction +13 -0
- package/dist/data/test/function/spiral_ring__then_0.mcfunction +2 -0
- package/dist/data/test/function/spring_force.mcfunction +11 -0
- package/dist/data/test/function/spring_update_v.mcfunction +18 -0
- package/dist/data/test/function/start.mcfunction +8 -0
- package/dist/data/test/function/stop.mcfunction +2 -0
- package/dist/data/test/function/stop__foreach_t0.mcfunction +1 -0
- package/dist/data/test/function/terrain_height.mcfunction +24 -0
- package/dist/data/test/function/uniform_scale.mcfunction +8 -0
- package/dist/data/test/function/update_pos.mcfunction +5 -0
- package/dist/data/test/function/value_noise_1d.mcfunction +14 -0
- package/dist/data/test/function/value_noise_1d__merge_1.mcfunction +39 -0
- package/dist/data/test/function/value_noise_1d__then_0.mcfunction +7 -0
- package/dist/data/test/function/value_noise_2d.mcfunction +15 -0
- package/dist/data/test/function/value_noise_2d__merge_1.mcfunction +13 -0
- package/dist/data/test/function/value_noise_2d__merge_3.mcfunction +98 -0
- package/dist/data/test/function/value_noise_2d__then_0.mcfunction +7 -0
- package/dist/data/test/function/value_noise_2d__then_2.mcfunction +7 -0
- package/dist/data/test/function/water_drag_fx.mcfunction +2 -0
- package/dist/pack.mcmeta +1 -1
- package/dist/src/__tests__/optimizer/lir/peephole.test.js +92 -0
- package/dist/src/ast/types.d.ts +7 -0
- package/dist/src/hir/lower.js +51 -0
- package/dist/src/optimizer/lir/peephole.d.ts +13 -4
- package/dist/src/optimizer/lir/peephole.js +44 -5
- package/dist/src/parser/index.js +12 -0
- package/editors/vscode/package-lock.json +3 -3
- package/editors/vscode/package.json +1 -1
- package/examples/math-demo.mcrs +127 -0
- package/examples/showcase.mcrs +64 -109
- package/package.json +1 -1
- package/src/__tests__/e2e/for-in-array.test.ts +62 -0
- package/src/__tests__/optimizer/lir/peephole.test.ts +100 -0
- package/src/ast/types.ts +1 -0
- package/src/hir/lower.ts +52 -0
- package/src/optimizer/lir/peephole.ts +50 -5
- package/src/parser/index.ts +13 -0
- package/src/stdlib/bigint.mcrs +128 -100
- package/src/stdlib/easing.mcrs +182 -0
- package/src/stdlib/matrix.mcrs +108 -0
- package/src/stdlib/noise.mcrs +153 -0
- package/src/stdlib/physics.mcrs +134 -0
|
@@ -134,3 +134,103 @@ describe('execute store peephole', () => {
|
|
|
134
134
|
expect(result).toBe(fn)
|
|
135
135
|
})
|
|
136
136
|
})
|
|
137
|
+
|
|
138
|
+
describe('execute store success peephole (cmp pattern)', () => {
|
|
139
|
+
test('merges score_set(0) + raw execute-set-1 into execute store success', () => {
|
|
140
|
+
const fn = mkFn([
|
|
141
|
+
{ kind: 'score_set', dst: mkSlot('$flag'), value: 0 },
|
|
142
|
+
{ kind: 'raw', cmd: `execute if score $a ${obj} > $b ${obj} run scoreboard players set $flag ${obj} 1` },
|
|
143
|
+
])
|
|
144
|
+
const result = execStorePeephole(fn)
|
|
145
|
+
expect(result.instructions).toHaveLength(1)
|
|
146
|
+
expect(result.instructions[0]).toEqual({
|
|
147
|
+
kind: 'raw',
|
|
148
|
+
cmd: `execute store success score $flag ${obj} if score $a ${obj} > $b ${obj}`,
|
|
149
|
+
})
|
|
150
|
+
})
|
|
151
|
+
|
|
152
|
+
test('merges with "unless" condition', () => {
|
|
153
|
+
const fn = mkFn([
|
|
154
|
+
{ kind: 'score_set', dst: mkSlot('$ne_flag'), value: 0 },
|
|
155
|
+
{ kind: 'raw', cmd: `execute unless score $x ${obj} = $y ${obj} run scoreboard players set $ne_flag ${obj} 1` },
|
|
156
|
+
])
|
|
157
|
+
const result = execStorePeephole(fn)
|
|
158
|
+
expect(result.instructions).toHaveLength(1)
|
|
159
|
+
expect(result.instructions[0]).toEqual({
|
|
160
|
+
kind: 'raw',
|
|
161
|
+
cmd: `execute store success score $ne_flag ${obj} unless score $x ${obj} = $y ${obj}`,
|
|
162
|
+
})
|
|
163
|
+
})
|
|
164
|
+
|
|
165
|
+
test('does not merge when players do not match', () => {
|
|
166
|
+
const fn = mkFn([
|
|
167
|
+
{ kind: 'score_set', dst: mkSlot('$a'), value: 0 },
|
|
168
|
+
{ kind: 'raw', cmd: `execute if score $x ${obj} > $y ${obj} run scoreboard players set $b ${obj} 1` },
|
|
169
|
+
])
|
|
170
|
+
const result = execStorePeephole(fn)
|
|
171
|
+
expect(result.instructions).toHaveLength(2)
|
|
172
|
+
expect(result).toBe(fn)
|
|
173
|
+
})
|
|
174
|
+
|
|
175
|
+
test('does not merge when objectives do not match', () => {
|
|
176
|
+
const fn = mkFn([
|
|
177
|
+
{ kind: 'score_set', dst: mkSlot('$flag'), value: 0 },
|
|
178
|
+
{ kind: 'raw', cmd: `execute if score $a other_obj > $b other_obj run scoreboard players set $flag other_obj 1` },
|
|
179
|
+
])
|
|
180
|
+
const result = execStorePeephole(fn)
|
|
181
|
+
// objectives differ between score_set (obj=__test) and raw (other_obj)
|
|
182
|
+
expect(result.instructions).toHaveLength(2)
|
|
183
|
+
expect(result).toBe(fn)
|
|
184
|
+
})
|
|
185
|
+
|
|
186
|
+
test('does not merge score_set(1) + raw execute-set-1 (value must be 0)', () => {
|
|
187
|
+
const fn = mkFn([
|
|
188
|
+
{ kind: 'score_set', dst: mkSlot('$flag'), value: 1 },
|
|
189
|
+
{ kind: 'raw', cmd: `execute if score $a ${obj} > $b ${obj} run scoreboard players set $flag ${obj} 1` },
|
|
190
|
+
])
|
|
191
|
+
const result = execStorePeephole(fn)
|
|
192
|
+
expect(result.instructions).toHaveLength(2)
|
|
193
|
+
expect(result).toBe(fn)
|
|
194
|
+
})
|
|
195
|
+
|
|
196
|
+
test('does not merge when there is an instruction between them', () => {
|
|
197
|
+
const fn = mkFn([
|
|
198
|
+
{ kind: 'score_set', dst: mkSlot('$flag'), value: 0 },
|
|
199
|
+
{ kind: 'call', fn: 'ns:other' },
|
|
200
|
+
{ kind: 'raw', cmd: `execute if score $a ${obj} > $b ${obj} run scoreboard players set $flag ${obj} 1` },
|
|
201
|
+
])
|
|
202
|
+
const result = execStorePeephole(fn)
|
|
203
|
+
expect(result.instructions).toHaveLength(3)
|
|
204
|
+
})
|
|
205
|
+
|
|
206
|
+
test('merges multiple adjacent cmp patterns', () => {
|
|
207
|
+
const fn = mkFn([
|
|
208
|
+
{ kind: 'score_set', dst: mkSlot('$r1'), value: 0 },
|
|
209
|
+
{ kind: 'raw', cmd: `execute if score $a ${obj} > $b ${obj} run scoreboard players set $r1 ${obj} 1` },
|
|
210
|
+
{ kind: 'score_set', dst: mkSlot('$r2'), value: 0 },
|
|
211
|
+
{ kind: 'raw', cmd: `execute if score $c ${obj} < $d ${obj} run scoreboard players set $r2 ${obj} 1` },
|
|
212
|
+
])
|
|
213
|
+
const result = execStorePeephole(fn)
|
|
214
|
+
expect(result.instructions).toHaveLength(2)
|
|
215
|
+
expect(result.instructions[0]).toEqual({
|
|
216
|
+
kind: 'raw',
|
|
217
|
+
cmd: `execute store success score $r1 ${obj} if score $a ${obj} > $b ${obj}`,
|
|
218
|
+
})
|
|
219
|
+
expect(result.instructions[1]).toEqual({
|
|
220
|
+
kind: 'raw',
|
|
221
|
+
cmd: `execute store success score $r2 ${obj} if score $c ${obj} < $d ${obj}`,
|
|
222
|
+
})
|
|
223
|
+
})
|
|
224
|
+
|
|
225
|
+
test('5 cmp patterns: saves exactly 5 commands', () => {
|
|
226
|
+
const instrs: LIRInstr[] = []
|
|
227
|
+
for (let k = 1; k <= 5; k++) {
|
|
228
|
+
instrs.push({ kind: 'score_set', dst: mkSlot(`$r${k}`), value: 0 })
|
|
229
|
+
instrs.push({ kind: 'raw', cmd: `execute if score $a ${obj} > $b ${obj} run scoreboard players set $r${k} ${obj} 1` })
|
|
230
|
+
}
|
|
231
|
+
const fn = mkFn(instrs)
|
|
232
|
+
expect(fn.instructions).toHaveLength(10)
|
|
233
|
+
const result = execStorePeephole(fn)
|
|
234
|
+
expect(result.instructions).toHaveLength(5)
|
|
235
|
+
})
|
|
236
|
+
})
|
package/src/ast/types.ts
CHANGED
|
@@ -234,6 +234,7 @@ export type Stmt =
|
|
|
234
234
|
| { kind: 'for'; init?: Stmt; cond: Expr; step: Expr; body: Block; span?: Span }
|
|
235
235
|
| { kind: 'foreach'; binding: string; iterable: Expr; body: Block; executeContext?: string; span?: Span }
|
|
236
236
|
| { kind: 'for_range'; varName: string; start: Expr; end: Expr; body: Block; span?: Span }
|
|
237
|
+
| { kind: 'for_in_array'; binding: string; arrayName: string; lenExpr: Expr; body: Block; span?: Span }
|
|
237
238
|
| { kind: 'match'; expr: Expr; arms: { pattern: Expr | null; body: Block }[]; span?: Span }
|
|
238
239
|
| { kind: 'if_let_some'; binding: string; init: Expr; then: Block; else_?: Block; span?: Span }
|
|
239
240
|
| { kind: 'as_block'; selector: EntitySelector; body: Block; span?: Span }
|
package/src/hir/lower.ts
CHANGED
|
@@ -196,6 +196,58 @@ function lowerStmt(stmt: Stmt): HIRStmt | HIRStmt[] {
|
|
|
196
196
|
return [initStmt, whileStmt]
|
|
197
197
|
}
|
|
198
198
|
|
|
199
|
+
// --- Desugaring: for_in_array → let idx = 0; while(idx < len) { let v = arr[idx]; body; idx = idx + 1 } ---
|
|
200
|
+
case 'for_in_array': {
|
|
201
|
+
const idxName = `__forin_idx_${stmt.binding}`
|
|
202
|
+
const initStmt: HIRStmt = {
|
|
203
|
+
kind: 'let',
|
|
204
|
+
name: idxName,
|
|
205
|
+
type: { kind: 'named', name: 'int' },
|
|
206
|
+
init: { kind: 'int_lit', value: 0 },
|
|
207
|
+
span: stmt.span,
|
|
208
|
+
}
|
|
209
|
+
const bindingInit: HIRStmt = {
|
|
210
|
+
kind: 'let',
|
|
211
|
+
name: stmt.binding,
|
|
212
|
+
type: undefined,
|
|
213
|
+
init: {
|
|
214
|
+
kind: 'index',
|
|
215
|
+
obj: { kind: 'ident', name: stmt.arrayName },
|
|
216
|
+
index: { kind: 'ident', name: idxName },
|
|
217
|
+
},
|
|
218
|
+
span: stmt.span,
|
|
219
|
+
}
|
|
220
|
+
const stepStmt: HIRStmt = {
|
|
221
|
+
kind: 'expr',
|
|
222
|
+
expr: {
|
|
223
|
+
kind: 'assign',
|
|
224
|
+
target: idxName,
|
|
225
|
+
value: {
|
|
226
|
+
kind: 'binary',
|
|
227
|
+
op: '+',
|
|
228
|
+
left: { kind: 'ident', name: idxName },
|
|
229
|
+
right: { kind: 'int_lit', value: 1 },
|
|
230
|
+
},
|
|
231
|
+
},
|
|
232
|
+
span: stmt.span,
|
|
233
|
+
}
|
|
234
|
+
const body = [bindingInit, ...lowerBlock(stmt.body)]
|
|
235
|
+
const step: HIRStmt[] = [stepStmt]
|
|
236
|
+
const whileStmt: HIRStmt = {
|
|
237
|
+
kind: 'while',
|
|
238
|
+
cond: {
|
|
239
|
+
kind: 'binary',
|
|
240
|
+
op: '<',
|
|
241
|
+
left: { kind: 'ident', name: idxName },
|
|
242
|
+
right: lowerExpr(stmt.lenExpr),
|
|
243
|
+
},
|
|
244
|
+
body,
|
|
245
|
+
step,
|
|
246
|
+
span: stmt.span,
|
|
247
|
+
}
|
|
248
|
+
return [initStmt, whileStmt]
|
|
249
|
+
}
|
|
250
|
+
|
|
199
251
|
case 'foreach':
|
|
200
252
|
return {
|
|
201
253
|
kind: 'foreach',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Execute-Store Peephole Pass — LIR optimization pass.
|
|
3
3
|
*
|
|
4
|
-
* Merges a `call_context` immediately followed by `score_set(dst, value)`
|
|
4
|
+
* Pattern 1: Merges a `call_context` immediately followed by `score_set(dst, value)`
|
|
5
5
|
* into a single `store_cmd_to_score` instruction:
|
|
6
6
|
*
|
|
7
7
|
* execute [subcommands] run function ns:fn ← call_context
|
|
@@ -11,15 +11,35 @@
|
|
|
11
11
|
*
|
|
12
12
|
* execute store result score $result __ns [subcommands] run function ns:fn
|
|
13
13
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
14
|
+
* Pattern 2: Merges a `score_set(dst, 0)` immediately followed by a `raw` command
|
|
15
|
+
* of the form `execute <cond> run scoreboard players set $dst __ns 1`:
|
|
16
|
+
*
|
|
17
|
+
* scoreboard players set $dst __ns 0 ← score_set(dst, 0)
|
|
18
|
+
* execute <cond> run scoreboard players set $dst __ns 1 ← raw
|
|
19
|
+
*
|
|
20
|
+
* becomes:
|
|
21
|
+
*
|
|
22
|
+
* execute store success score $dst __ns <cond>
|
|
23
|
+
*
|
|
24
|
+
* This saves one command per boolean comparison (cmp instruction lowering).
|
|
16
25
|
*
|
|
17
26
|
* Safety: only merges when the two instructions are immediately adjacent
|
|
18
|
-
* (no instructions between them).
|
|
27
|
+
* (no instructions between them) and the destination slot is identical.
|
|
19
28
|
*/
|
|
20
29
|
|
|
21
30
|
import type { LIRFunction, LIRInstr } from '../../lir/types'
|
|
22
31
|
|
|
32
|
+
/**
|
|
33
|
+
* Regex for Pattern 2's second instruction:
|
|
34
|
+
* execute (if|unless) score ... run scoreboard players set $X OBJ 1
|
|
35
|
+
*
|
|
36
|
+
* Captures:
|
|
37
|
+
* [1] the full condition part (everything before " run scoreboard ...")
|
|
38
|
+
* [2] the destination player ($X)
|
|
39
|
+
* [3] the destination objective
|
|
40
|
+
*/
|
|
41
|
+
const SET_ZERO_SET_ONE_RE = /^execute (.+) run scoreboard players set (\S+) (\S+) 1$/
|
|
42
|
+
|
|
23
43
|
export function execStorePeephole(fn: LIRFunction): LIRFunction {
|
|
24
44
|
const instrs = fn.instructions
|
|
25
45
|
if (instrs.length < 2) return fn
|
|
@@ -32,7 +52,7 @@ export function execStorePeephole(fn: LIRFunction): LIRFunction {
|
|
|
32
52
|
const curr = instrs[i]
|
|
33
53
|
const next = instrs[i + 1]
|
|
34
54
|
|
|
35
|
-
// Pattern: call_context immediately followed by score_set
|
|
55
|
+
// Pattern 1: call_context immediately followed by score_set
|
|
36
56
|
if (
|
|
37
57
|
next &&
|
|
38
58
|
curr.kind === 'call_context' &&
|
|
@@ -49,6 +69,31 @@ export function execStorePeephole(fn: LIRFunction): LIRFunction {
|
|
|
49
69
|
continue
|
|
50
70
|
}
|
|
51
71
|
|
|
72
|
+
// Pattern 2: score_set(dst, 0) + raw("execute <cond> run scoreboard players set $dst OBJ 1")
|
|
73
|
+
// → raw("execute store success score $dst OBJ <cond>")
|
|
74
|
+
if (
|
|
75
|
+
next &&
|
|
76
|
+
curr.kind === 'score_set' &&
|
|
77
|
+
curr.value === 0 &&
|
|
78
|
+
next.kind === 'raw'
|
|
79
|
+
) {
|
|
80
|
+
const m = SET_ZERO_SET_ONE_RE.exec(next.cmd)
|
|
81
|
+
if (
|
|
82
|
+
m &&
|
|
83
|
+
m[2] === curr.dst.player &&
|
|
84
|
+
m[3] === curr.dst.obj
|
|
85
|
+
) {
|
|
86
|
+
const cond = m[1]
|
|
87
|
+
result.push({
|
|
88
|
+
kind: 'raw',
|
|
89
|
+
cmd: `execute store success score ${curr.dst.player} ${curr.dst.obj} ${cond}`,
|
|
90
|
+
})
|
|
91
|
+
changed = true
|
|
92
|
+
i += 2
|
|
93
|
+
continue
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
52
97
|
result.push(curr)
|
|
53
98
|
i++
|
|
54
99
|
}
|
package/src/parser/index.ts
CHANGED
|
@@ -823,6 +823,19 @@ export class Parser {
|
|
|
823
823
|
|
|
824
824
|
this.expect('(')
|
|
825
825
|
|
|
826
|
+
// Detect for-in-array syntax: for ( let ident in ident , lenExpr ) { ... }
|
|
827
|
+
if (this.check('let') && this.peek(1).kind === 'ident' && this.peek(2).kind === 'in' && this.peek(3).kind === 'ident' && this.peek(4).kind === ',') {
|
|
828
|
+
this.advance() // consume 'let'
|
|
829
|
+
const binding = this.expect('ident').value
|
|
830
|
+
this.expect('in')
|
|
831
|
+
const arrayName = this.expect('ident').value
|
|
832
|
+
this.expect(',')
|
|
833
|
+
const lenExpr = this.parseExpr()
|
|
834
|
+
this.expect(')')
|
|
835
|
+
const body = this.parseBlock()
|
|
836
|
+
return this.withLoc({ kind: 'for_in_array', binding, arrayName, lenExpr, body }, forToken)
|
|
837
|
+
}
|
|
838
|
+
|
|
826
839
|
// Init: either let statement (without semicolon) or empty
|
|
827
840
|
let init: Stmt | undefined
|
|
828
841
|
if (this.check('let')) {
|
package/src/stdlib/bigint.mcrs
CHANGED
|
@@ -1,124 +1,65 @@
|
|
|
1
1
|
// bigint.mcrs — Multi-precision integer arithmetic for RedScript.
|
|
2
2
|
//
|
|
3
|
-
// Representation:
|
|
4
|
-
// [
|
|
5
|
-
// Each element
|
|
6
|
-
//
|
|
7
|
-
// Leading zeros in non-first elements must be preserved conceptually.
|
|
3
|
+
// Representation: base-10000 (万进制) int array stored in NBT storage.
|
|
4
|
+
// arr[0] = most significant chunk (big-endian)
|
|
5
|
+
// Each element: 0-9999 (4 decimal digits)
|
|
6
|
+
// Example: [1, 2345, 6789] = 1_0002345_6789 = 100,023,456,789
|
|
8
7
|
//
|
|
9
|
-
//
|
|
8
|
+
// Functions for 96-bit (3-chunk) operations:
|
|
9
|
+
// bigint3_add, bigint3_sub, bigint3_mul1, bigint3_cmp, bigint3_div_by_small
|
|
10
10
|
//
|
|
11
|
-
//
|
|
12
|
-
//
|
|
13
|
-
//
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
//
|
|
17
|
-
// NOTE: Full arbitrary-precision ops (like kaer's library) require
|
|
18
|
-
// complex NBT recursion not yet expressible in RedScript.
|
|
19
|
-
// This module provides a 96-bit (3 × 4-digit) max precision layer,
|
|
20
|
-
// which covers values up to ~10^12 (1 trillion).
|
|
11
|
+
// Functions for arbitrary-length arrays (requires array by-ref, RedScript ≥ 2.4.0):
|
|
12
|
+
// bigint_add(a, b, result, len) — add two n-chunk bigints
|
|
13
|
+
// bigint_cmp(a, b, len) — compare two n-chunk bigints
|
|
14
|
+
// bigint_mul_small(a, n, result, len) — multiply n-chunk bigint by small int
|
|
15
|
+
// bigint_zero(arr, len) — set array to zero
|
|
16
|
+
// bigint_copy(src, dst, len) — copy bigint
|
|
21
17
|
|
|
22
18
|
module library;
|
|
23
19
|
|
|
24
20
|
// ─── Constants ───────────────────────────────────────────────────────────────
|
|
25
21
|
|
|
26
|
-
// BIGINT_BASE: base for 万进制 representation
|
|
27
22
|
fn bigint_base(): int { return 10000; }
|
|
28
23
|
|
|
29
|
-
// ─── Single-
|
|
30
|
-
// These work on individual 4-digit chunks.
|
|
31
|
-
|
|
32
|
-
// chunk_hi(n): upper 4 digits of an 8-digit product (n must fit in int32)
|
|
33
|
-
// chunk_hi(12345678) = 1234
|
|
34
|
-
fn chunk_hi(n: int): int {
|
|
35
|
-
return n / 10000;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// chunk_lo(n): lower 4 digits
|
|
39
|
-
// chunk_lo(12345678) = 5678
|
|
40
|
-
fn chunk_lo(n: int): int {
|
|
41
|
-
return n % 10000;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// ─── 96-bit (3-chunk) addition ────────────────────────────────────────────────
|
|
45
|
-
// Represents number as (hi, mid, lo) where value = hi*10^8 + mid*10^4 + lo
|
|
46
|
-
|
|
47
|
-
// bigint3_add_lo(alo, blo): low chunk sum (carry handled by mid)
|
|
48
|
-
fn bigint3_add_lo(alo: int, blo: int): int {
|
|
49
|
-
return (alo + blo) % 10000;
|
|
50
|
-
}
|
|
24
|
+
// ─── Single-chunk helpers ────────────────────────────────────────────────────
|
|
51
25
|
|
|
52
|
-
|
|
53
|
-
fn
|
|
54
|
-
return (alo + blo) / 10000;
|
|
55
|
-
}
|
|
26
|
+
fn chunk_hi(n: int): int { return n / 10000; }
|
|
27
|
+
fn chunk_lo(n: int): int { return n % 10000; }
|
|
56
28
|
|
|
57
|
-
//
|
|
58
|
-
fn bigint3_add_mid(amid: int, bmid: int, carry: int): int {
|
|
59
|
-
return (amid + bmid + carry) % 10000;
|
|
60
|
-
}
|
|
29
|
+
// ─── 3-chunk (96-bit) arithmetic ─────────────────────────────────────────────
|
|
61
30
|
|
|
62
|
-
fn
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
fn bigint3_add_hi(ahi: int, bhi: int, carry: int): int {
|
|
67
|
-
return (ahi + bhi + carry) % 10000;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
// ─── 96-bit subtraction (a >= b assumed) ─────────────────────────────────────
|
|
31
|
+
fn bigint3_add_lo(alo: int, blo: int): int { return (alo + blo) % 10000; }
|
|
32
|
+
fn bigint3_carry_lo(alo: int, blo: int): int { return (alo + blo) / 10000; }
|
|
33
|
+
fn bigint3_add_mid(amid: int, bmid: int, carry: int): int { return (amid + bmid + carry) % 10000; }
|
|
34
|
+
fn bigint3_carry_mid(amid: int, bmid: int, carry: int): int { return (amid + bmid + carry) / 10000; }
|
|
35
|
+
fn bigint3_add_hi(ahi: int, bhi: int, carry: int): int { return (ahi + bhi + carry) % 10000; }
|
|
71
36
|
|
|
72
37
|
fn bigint3_sub_lo(alo: int, blo: int): int {
|
|
73
38
|
if (alo >= blo) { return alo - blo; }
|
|
74
39
|
return alo + 10000 - blo;
|
|
75
40
|
}
|
|
76
|
-
|
|
77
41
|
fn bigint3_borrow_lo(alo: int, blo: int): int {
|
|
78
42
|
if (alo >= blo) { return 0; }
|
|
79
43
|
return 1;
|
|
80
44
|
}
|
|
81
|
-
|
|
82
45
|
fn bigint3_sub_mid(amid: int, bmid: int, borrow: int): int {
|
|
83
46
|
let v: int = amid - bmid - borrow;
|
|
84
47
|
if (v < 0) { v = v + 10000; }
|
|
85
48
|
return v;
|
|
86
49
|
}
|
|
87
|
-
|
|
88
50
|
fn bigint3_borrow_mid(amid: int, bmid: int, borrow: int): int {
|
|
89
51
|
if (amid - borrow >= bmid) { return 0; }
|
|
90
52
|
return 1;
|
|
91
53
|
}
|
|
92
|
-
|
|
93
54
|
fn bigint3_sub_hi(ahi: int, bhi: int, borrow: int): int {
|
|
94
55
|
return ahi - bhi - borrow;
|
|
95
56
|
}
|
|
96
57
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
// bigint3_mul_lo(a, b): low chunk of a × b (a, b each up to 10^12 / 10^8)
|
|
100
|
-
// For a, b ≤ 9999 (one chunk each):
|
|
101
|
-
fn bigint3_mul1_lo(a: int, b: int): int {
|
|
102
|
-
return (a * b) % 10000;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
fn bigint3_mul1_hi(a: int, b: int): int {
|
|
106
|
-
return (a * b) / 10000;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
// int32 × int32 → 96-bit: a*b where both ≤ 9999
|
|
110
|
-
// Result fits in 8 decimal digits (max 9999*9999 = 99,980,001)
|
|
111
|
-
fn bigint3_mul1_mid(a: int, b: int): int {
|
|
112
|
-
// No mid chunk needed for 1×1; return 0
|
|
113
|
-
return 0;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
// ─── Comparison ──────────────────────────────────────────────────────────────
|
|
58
|
+
fn bigint3_mul1_lo(a: int, b: int): int { return (a * b) % 10000; }
|
|
59
|
+
fn bigint3_mul1_hi(a: int, b: int): int { return (a * b) / 10000; }
|
|
117
60
|
|
|
118
|
-
//
|
|
119
|
-
|
|
120
|
-
fn bigint3_cmp(ahi: int, amid: int, alo: int,
|
|
121
|
-
bhi: int, bmid: int, blo: int): int {
|
|
61
|
+
// Compare: returns 1 if a>b, -1 if a<b, 0 if equal
|
|
62
|
+
fn bigint3_cmp(ahi: int, amid: int, alo: int, bhi: int, bmid: int, blo: int): int {
|
|
122
63
|
if (ahi > bhi) { return 1; }
|
|
123
64
|
if (ahi < bhi) { return -1; }
|
|
124
65
|
if (amid > bmid) { return 1; }
|
|
@@ -128,41 +69,128 @@ fn bigint3_cmp(ahi: int, amid: int, alo: int,
|
|
|
128
69
|
return 0;
|
|
129
70
|
}
|
|
130
71
|
|
|
131
|
-
//
|
|
132
|
-
|
|
133
|
-
// int32_to_bigint3_lo(n): low chunk of n (4 digits)
|
|
72
|
+
// int32 → 3 chunks
|
|
134
73
|
fn int32_to_bigint3_lo(n: int): int {
|
|
135
74
|
if (n < 0) { n = 0 - n; }
|
|
136
75
|
return n % 10000;
|
|
137
76
|
}
|
|
138
|
-
|
|
139
|
-
// int32_to_bigint3_mid(n): mid chunk (digits 5-8)
|
|
140
77
|
fn int32_to_bigint3_mid(n: int): int {
|
|
141
78
|
if (n < 0) { n = 0 - n; }
|
|
142
79
|
return (n / 10000) % 10000;
|
|
143
80
|
}
|
|
144
|
-
|
|
145
|
-
// int32_to_bigint3_hi(n): high chunk (digits 9+, usually 0 for int32)
|
|
146
81
|
fn int32_to_bigint3_hi(n: int): int {
|
|
147
82
|
if (n < 0) { n = 0 - n; }
|
|
148
83
|
return n / 100000000;
|
|
149
84
|
}
|
|
150
|
-
|
|
151
|
-
// bigint3_to_int32(hi, mid, lo): convert back to int32 (truncates if > 2^31)
|
|
152
85
|
fn bigint3_to_int32(hi: int, mid: int, lo: int): int {
|
|
153
86
|
return hi * 100000000 + mid * 10000 + lo;
|
|
154
87
|
}
|
|
155
88
|
|
|
156
|
-
//
|
|
157
|
-
// Divide 3-chunk bigint by a single small integer (≤ 9999).
|
|
158
|
-
// Algorithm: long division, chunk by chunk.
|
|
159
|
-
|
|
160
|
-
// bigint3_div_chunk(chunk, rem, divisor): quotient of (rem*10000 + chunk) / divisor
|
|
89
|
+
// Division helpers (array ÷ small int ≤ 9999)
|
|
161
90
|
fn bigint3_div_chunk(chunk: int, rem: int, divisor: int): int {
|
|
162
91
|
return (rem * 10000 + chunk) / divisor;
|
|
163
92
|
}
|
|
164
|
-
|
|
165
|
-
// bigint3_rem_chunk(chunk, rem, divisor): new remainder after dividing (rem*10000+chunk)
|
|
166
93
|
fn bigint3_rem_chunk(chunk: int, rem: int, divisor: int): int {
|
|
167
94
|
return (rem * 10000 + chunk) % divisor;
|
|
168
95
|
}
|
|
96
|
+
|
|
97
|
+
// ─── Arbitrary-length operations (array by-ref, RedScript ≥ 2.4.0) ──────────
|
|
98
|
+
|
|
99
|
+
// bigint_zero(arr, len): set all chunks to 0
|
|
100
|
+
fn bigint_zero(arr: int[], len: int) {
|
|
101
|
+
let i: int = 0;
|
|
102
|
+
while (i < len) { arr[i] = 0; i = i + 1; }
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// bigint_copy(src, dst, len): copy src into dst
|
|
106
|
+
fn bigint_copy(src: int[], dst: int[], len: int) {
|
|
107
|
+
let i: int = 0;
|
|
108
|
+
while (i < len) { dst[i] = src[i]; i = i + 1; }
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// bigint_cmp(a, b, len): compare a and b, returns 1 if a>b, -1 if a<b, 0 if equal
|
|
112
|
+
// Most significant chunk is at index 0 (big-endian)
|
|
113
|
+
fn bigint_cmp(a: int[], b: int[], len: int): int {
|
|
114
|
+
let i: int = 0;
|
|
115
|
+
while (i < len) {
|
|
116
|
+
if (a[i] > b[i]) { return 1; }
|
|
117
|
+
if (a[i] < b[i]) { return -1; }
|
|
118
|
+
i = i + 1;
|
|
119
|
+
}
|
|
120
|
+
return 0;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// bigint_add(a, b, result, len): result = a + b (in-place into result array)
|
|
124
|
+
// Returns carry out (0 or 1) — caller should handle overflow
|
|
125
|
+
fn bigint_add(a: int[], b: int[], result: int[], len: int): int {
|
|
126
|
+
let carry: int = 0;
|
|
127
|
+
let i: int = len - 1; // start from least significant (rightmost)
|
|
128
|
+
while (i >= 0) {
|
|
129
|
+
let sum: int = a[i] + b[i] + carry;
|
|
130
|
+
result[i] = sum % 10000;
|
|
131
|
+
carry = sum / 10000;
|
|
132
|
+
i = i - 1;
|
|
133
|
+
}
|
|
134
|
+
return carry;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// bigint_sub(a, b, result, len): result = a - b (assumes a >= b)
|
|
138
|
+
fn bigint_sub(a: int[], b: int[], result: int[], len: int) {
|
|
139
|
+
let borrow: int = 0;
|
|
140
|
+
let i: int = len - 1;
|
|
141
|
+
while (i >= 0) {
|
|
142
|
+
let diff: int = a[i] - b[i] - borrow;
|
|
143
|
+
if (diff < 0) {
|
|
144
|
+
diff = diff + 10000;
|
|
145
|
+
borrow = 1;
|
|
146
|
+
}
|
|
147
|
+
if (diff >= 0) { borrow = 0; }
|
|
148
|
+
result[i] = diff;
|
|
149
|
+
i = i - 1;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// bigint_mul_small(a, n, result, len): result = a × n, where n ≤ 9999
|
|
154
|
+
fn bigint_mul_small(a: int[], n: int, result: int[], len: int) {
|
|
155
|
+
let carry: int = 0;
|
|
156
|
+
let i: int = len - 1;
|
|
157
|
+
while (i >= 0) {
|
|
158
|
+
let prod: int = a[i] * n + carry;
|
|
159
|
+
result[i] = prod % 10000;
|
|
160
|
+
carry = prod / 10000;
|
|
161
|
+
i = i - 1;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// bigint_shift_left(arr, len): multiply by 10000 (shift left one chunk)
|
|
166
|
+
// Loses most significant chunk if non-zero
|
|
167
|
+
fn bigint_shift_left(arr: int[], len: int) {
|
|
168
|
+
let i: int = 0;
|
|
169
|
+
while (i < len - 1) {
|
|
170
|
+
arr[i] = arr[i + 1];
|
|
171
|
+
i = i + 1;
|
|
172
|
+
}
|
|
173
|
+
arr[len - 1] = 0;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// bigint_is_zero(arr, len): returns 1 if all chunks are 0
|
|
177
|
+
fn bigint_is_zero(arr: int[], len: int): int {
|
|
178
|
+
let i: int = 0;
|
|
179
|
+
while (i < len) {
|
|
180
|
+
if (arr[i] != 0) { return 0; }
|
|
181
|
+
i = i + 1;
|
|
182
|
+
}
|
|
183
|
+
return 1;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// bigint_leading_zeros(arr, len): count leading zero chunks
|
|
187
|
+
fn bigint_leading_zeros(arr: int[], len: int): int {
|
|
188
|
+
let count: int = 0;
|
|
189
|
+
let i: int = 0;
|
|
190
|
+
while (i < len) {
|
|
191
|
+
if (arr[i] != 0) { return count; }
|
|
192
|
+
count = count + 1;
|
|
193
|
+
i = i + 1;
|
|
194
|
+
}
|
|
195
|
+
return count;
|
|
196
|
+
}
|