diff options
author | DS <vorunbekannt75@web.de> | 2021-09-10 23:16:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-10 23:16:16 +0200 |
commit | 2cefe51d3b9bc4f3ae18854e171a06ea83e9cb25 (patch) | |
tree | c80c7a13df16eb1a8db02dad5c39ddffb71c206a /doc | |
parent | bbfae0cc673d3abdc21224c53e09b209ee4688a2 (diff) | |
download | minetest-2cefe51d3b9bc4f3ae18854e171a06ea83e9cb25.tar.gz minetest-2cefe51d3b9bc4f3ae18854e171a06ea83e9cb25.tar.bz2 minetest-2cefe51d3b9bc4f3ae18854e171a06ea83e9cb25.zip |
Split vector.new into 3 constructors
Diffstat (limited to 'doc')
-rw-r--r-- | doc/lua_api.txt | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 3a1a3f02f..73c5b43a5 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -3271,10 +3271,13 @@ For the following functions, `v`, `v1`, `v2` are vectors, vectors are written like this: `(x, y, z)`: * `vector.new([a[, b, c]])`: - * Returns a vector. - * A copy of `a` if `a` is a vector. - * `(a, b, c)`, if all of `a`, `b`, `c` are defined numbers. - * `(0, 0, 0)`, if no arguments are given. + * Returns a new vector `(a, b, c)`. + * Deprecated: `vector.new()` does the same as `vector.zero()` and + `vector.new(v)` does the same as `vector.copy(v)` +* `vector.zero()`: + * Returns a new vector `(0, 0, 0)`. +* `vector.copy(v)`: + * Returns a copy of the vector `v`. * `vector.from_string(s[, init])`: * Returns `v, np`, where `v` is a vector read from the given string `s` and `np` is the next position in the string after the vector. |