diff options
author | ShadowNinja <noreply@gmail.com> | 2013-09-16 16:13:39 -0400 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2013-10-17 09:41:01 +0300 |
commit | 12504a18ec5b76df037482ea2cf435d8c320efbc (patch) | |
tree | 2fb4a4eb9ff8c6fba02fa7c61ff088bb71e38321 /doc | |
parent | b3591019ad7e9bdce2a0a20cbbf64a769c1717c2 (diff) | |
download | minetest-12504a18ec5b76df037482ea2cf435d8c320efbc.tar.gz minetest-12504a18ec5b76df037482ea2cf435d8c320efbc.tar.bz2 minetest-12504a18ec5b76df037482ea2cf435d8c320efbc.zip |
Remove vector metatable setting
This not only makes the vector functions faster, but also makes them more
consistent with other functions.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/lua_api.txt | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index cfea3b5c1..5a0d5817f 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -1037,22 +1037,12 @@ vector.length(v) -> number vector.normalize(v) -> vector vector.round(v) -> vector vector.equal(v1, v2) -> bool +For the folowing x can be either a vector or a number. vector.add(v, x) -> vector - ^ x can be annother vector or a number vector.subtract(v, x) -> vector vector.multiply(v, x) -> vector vector.divide(v, x) -> vector -You can also use Lua operators on vectors. -For example: - v1 = vector.new() - v1 = v1 + 5 - v2 = vector.new(v1) - v1 = v1 * v2 - if v1 == v2 then - error("Math broke") - end - Helper functions ----------------- dump2(obj, name="_", dumped={}) |