Skip to content
Open
Show file tree
Hide file tree
Changes from 42 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
076c909
Add vector2 lua API for 2D vectors
Copilot Feb 10, 2026
a3fcf53
Remove vector2 <-> vector conversion functions
Copilot Feb 10, 2026
4c7937c
Remove deprecated vector2 behaviors inherited from vector
Copilot Feb 10, 2026
7acf61b
fix C++ push functions to create 2D vectors with metatables
Copilot Feb 10, 2026
85dee3f
Add polar coordinates and signed angles to vector2 API
Copilot Feb 10, 2026
349ca88
Fix whitespace-only lines in vector2_spec.lua
Copilot Feb 10, 2026
facc96f
Apply suggestions from code review
kromka-chleba Feb 10, 2026
bb1606e
Use CUSTOM_RIDX_READ_VECTOR2 in read_v2f
Copilot Feb 10, 2026
b81d037
Add devtest unittest for pushing and reading vector2 to/from the engine
Copilot Feb 10, 2026
20f1677
Add vector2 to devtest luacheck read_globals
Copilot Feb 10, 2026
0c75675
Simplify vector2.equals() test
Copilot Feb 10, 2026
86c7e7b
Update builtin/common/vector2.lua
kromka-chleba Feb 10, 2026
430a5bf
Refactor vector2_spec.lua assertions: use assert.same for deep compar…
Copilot Feb 11, 2026
c8ec5b5
Use approximate equality for vector2 length-related tests
Copilot Feb 12, 2026
b329a69
Replace almost_equal with assert.close in vector2_spec.lua
Copilot Feb 12, 2026
99ea675
Reduce vector2 test bloat for from_polar, to_polar, and signed_angle
Copilot Feb 12, 2026
0d70472
Apply suggestion from @appgurueu
kromka-chleba Feb 12, 2026
038dddd
Remove call order dependency from `vector` and `vector2` apply() tests
Copilot Feb 12, 2026
b61de39
Fix vector2.to_string precision and test brittleness
Copilot Feb 12, 2026
418f965
Remove whitespace-only lines in vector2_spec.lua
Copilot Feb 12, 2026
736d673
Rename vector2.from_polar parameters for clarity: r->radius, theta->a…
Copilot Feb 12, 2026
b9e5c27
Rvert random changes in builtin/common/tests/vector_spec.lua
kromka-chleba Feb 12, 2026
f374bc0
Deduplicate vector documentation with shared common section
Copilot Feb 13, 2026
23a8fc4
Remove vector2.random_in_area() and vector2.rotate()
Copilot Feb 13, 2026
3bde8f9
Consolidate common vector/vector2 function documentation
Copilot Feb 14, 2026
ab8507b
Reintroduce vector2.rotate with tests and documentation
Copilot Feb 14, 2026
076e4a5
Rename vector_close to vector2_close in vector2 tests
Copilot Feb 14, 2026
671ab93
Remove redundant vector documentation sections
Copilot Feb 16, 2026
77de8b5
Move vector array format clarification to common documentation
Copilot Feb 16, 2026
270c678
Replace `r, theta` with `radius, angle` in vector2.to_polar() documen…
Copilot Feb 16, 2026
ec74ebb
Do the `angle` unary thing stuff
Copilot Feb 16, 2026
862ac27
Revert "Do the `angle` unary thing stuff"
kromka-chleba Feb 16, 2026
11d4f67
The thing
Copilot Feb 16, 2026
4f076c7
Fix vector2 documentation: replace non-existent from_polar/to_polar w…
Copilot Feb 16, 2026
c49992a
Remove vector2.signed_angle function
Copilot Feb 16, 2026
0b11653
Update vector2 documentation: texture coordinates → screen coordinates
Copilot Feb 16, 2026
48bd4cb
Document `to_string`, use the rounded variant.
Copilot Feb 17, 2026
cf34872
Document vector2.to_angle edge case for zero vector
Copilot Feb 17, 2026
fa3914f
vector2 combine() test: scramble values so max/min draw from both vec…
Copilot Feb 19, 2026
0bace86
Update builtin/common/vector2.lua
kromka-chleba Mar 7, 2026
ce5accb
Fix check_v2f to use read_v2_aux
Copilot Mar 9, 2026
a302153
unittest: Assert push_v2s32/push_v2f produce vector2 metatable
Copilot Mar 9, 2026
282d2ac
docs: remove redundant `/ vector2.foo()` notation from common vector …
Copilot Mar 12, 2026
b168087
Update doc/lua_api.md
kromka-chleba Mar 14, 2026
01551f9
Clarify deprecation notice for vector operations
kromka-chleba Mar 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ read_globals = {
"dump", "dump2",
"fgettext", "fgettext_ne",
"vector",
"vector2",
"VoxelArea",
"VoxelManip",
"profiler",
Expand All @@ -24,7 +25,7 @@ read_globals = {

string = {fields = {"split", "trim"}},
table = {fields = {"copy", "copy_with_metatables", "getn", "indexof", "keyof", "insert_all", "shuffle"}},
math = {fields = {"hypot", "round", "isfinite"}},
math = {fields = {"hypot", "round", "isfinite", "sign"}},
}

globals = {
Expand Down Expand Up @@ -71,6 +72,10 @@ files["builtin/common/vector.lua"] = {
globals = { "vector", "math" },
}

files["builtin/common/vector2.lua"] = {
globals = { "vector2", "math" },
}

files["builtin/game/voxelarea.lua"] = {
globals = { "VoxelArea" },
}
Expand Down
Loading
Loading