mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-12 16:15:20 +02:00
Add vector.random_direction()
(#14784)
Generate a random vector of unit length. Useful for many mods.
This commit is contained in:
@@ -3820,6 +3820,8 @@ vectors are written like this: `(x, y, z)`:
|
||||
`vector.new(v)` does the same as `vector.copy(v)`
|
||||
* `vector.zero()`:
|
||||
* Returns a new vector `(0, 0, 0)`.
|
||||
* `vector.random_direction()`:
|
||||
* Returns a new vector of length 1, pointing into a direction chosen uniformly at random.
|
||||
* `vector.copy(v)`:
|
||||
* Returns a copy of the vector `v`.
|
||||
* `vector.from_string(s[, init])`:
|
||||
|
Reference in New Issue
Block a user