aboutsummaryrefslogtreecommitdiff
path: root/doc/lua_api.txt
diff options
context:
space:
mode:
authorAFCMS <afcm.contact@gmail.com>2023-04-12 11:46:26 +0200
committerGitHub <noreply@github.com>2023-04-12 10:46:26 +0100
commit68f81ace97db0d41b4a51876870c30cebec1338c (patch)
treec2fa3119b949814f438057a29af9ff0dbcb1d780 /doc/lua_api.txt
parent2fc7eb3ea26af60feadc182a9d469d630314665b (diff)
downloadminetest-68f81ace97db0d41b4a51876870c30cebec1338c.tar.xz
Add `vector.in_area()` utility function (#13390)
Diffstat (limited to 'doc/lua_api.txt')
-rw-r--r--doc/lua_api.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index 3e85da2f6..7fd56c9f7 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -3540,6 +3540,11 @@ vectors are written like this: `(x, y, z)`:
* Returns a boolean value indicating whether `v` is a real vector, eg. created
by a `vector.*` function.
* Returns `false` for anything else, including tables like `{x=3,y=1,z=4}`.
+* `vector.in_area(pos, min, max)`:
+ * Returns a boolean value indicating if `pos` is inside area formed by `min` and `max`.
+ * `min` and `max` are inclusive.
+ * If `min` is bigger than `max` on some axis, function always returns false.
+ * You can use `vector.sort` if you have two vectors and don't know which are the minimum and the maximum.
For the following functions `x` can be either a vector or a number: