Add exact arithmetic implementation and tests

- Introduced exact arithmetic with support for large integers and fractions in `exact.gd`, `big_integer.gd`, and `exact_value.gd`.
- Implemented a comprehensive test suite in `test_exact_math.gd` to validate arithmetic operations against expected results.
- Added a README in `math` directory to document the exact arithmetic system and its usage.
- Ensured that all arithmetic operations maintain precision without floating-point errors, using a custom representation for large numbers.
- Included methods for encoding and decoding exact values for serialization.
This commit is contained in:
Kirill
2026-09-30 08:08:27 +03:00
parent f2111a376a
commit fb8a3f5658
58 changed files with 5139 additions and 2162 deletions
+13 -8
View File
@@ -99,6 +99,7 @@ size_flags_vertical = 3
script = ExtResource("3_k83x5")
[node name="World" type="VBoxContainer" parent="Stage" unique_id=1878643860]
visible = false
layout_mode = 1
anchors_preset = 10
anchor_right = 1.0
@@ -1058,10 +1059,9 @@ texture = ExtResource("61_d36xh")
stretch_mode = 3
[node name="Credits" type="VBoxContainer" parent="Stage" unique_id=785042592]
visible = false
layout_mode = 0
offset_right = 40.0
offset_bottom = 40.0
offset_right = 1080.0
offset_bottom = 1920.0
script = ExtResource("62_o2i0n")
[node name="TopMenu" type="HBoxContainer" parent="Stage/Credits" unique_id=1983527467]
@@ -1088,15 +1088,20 @@ texture = ExtResource("62_vu83j")
custom_minimum_size = Vector2(1080, 0)
layout_mode = 2
[node name="Highlight" type="TextureRect" parent="Stage/Credits/Logo" unique_id=1035898922]
visible = false
layout_mode = 2
texture = ExtResource("64_rur7c")
[node name="Lamp" type="TextureButton" parent="Stage/Credits/Logo" unique_id=1059180893]
layout_mode = 2
texture_normal = ExtResource("65_y1rwn")
[node name="Highlight" type="TextureRect" parent="Stage/Credits/Logo" unique_id=1035898922]
visible = false
layout_mode = 2
mouse_filter = 2
texture = ExtResource("64_rur7c")
[node name="Control" type="Control" parent="Stage/Credits" unique_id=1835435348]
layout_mode = 2
size_flags_vertical = 3
[node name="ItemAmountUpdate" type="Timer" parent="Stage" unique_id=1953928024]
wait_time = 0.2
autostart = true