aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorTim <t4im@users.noreply.github.com>2015-09-20 15:19:52 +0200
committerest31 <MTest31@outlook.com>2015-09-26 21:28:50 +0200
commit776760aba730f1db565d124b4c04efae1c152d9e (patch)
tree01cdf488e3a3b1a45e3bfb4dbe19dd3efadffa2d /doc
parent89e8f3a9182f5ec15b0c43389a516b10a54741d9 (diff)
downloadminetest-776760aba730f1db565d124b4c04efae1c152d9e.tar.gz
minetest-776760aba730f1db565d124b4c04efae1c152d9e.tar.bz2
minetest-776760aba730f1db565d124b4c04efae1c152d9e.zip
Clarify radii and distance types in documentation
Because not all circles are round: * circles using an euclidean metric are what we usually call "round" * circles using a maximum metric look like euclidean rectangles with equal adjacent sides (squares) * circles using a manhattan metric look like an euclidean right angled rhombus (squares, but 45° rotated to the former one) [ci skip]
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt14
1 files changed, 8 insertions, 6 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index fac779c60..5b6e55ef3 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -393,13 +393,13 @@ Examples of sound parameter tables:
{
pos = {x=1,y=2,z=3},
gain = 1.0, -- default
- max_hear_distance = 32, -- default
+ max_hear_distance = 32, -- default, uses an euclidean metric
}
-- Play connected to an object, looped
{
object = <an ObjectRef>,
gain = 1.0, -- default
- max_hear_distance = 32, -- default
+ max_hear_distance = 32, -- default, uses an euclidean metric
loop = true, -- only sounds connected to objects can be looped
}
@@ -1664,7 +1664,7 @@ numerical form, the raw integer value of an ARGB8 quad:
or string form, a ColorString (defined above):
`colorspec = "green"`
-Vector helpers
+Spatial Vectors
--------------
* `vector.new([x[, y, z]])`: returns a vector.
@@ -1682,8 +1682,8 @@ For the following functions `x` can be either a vector or a number:
* `vector.add(v, x)`: returns a vector
* `vector.subtract(v, x)`: returns a vector
-* `vector.multiply(v, x)`: returns a vector
-* `vector.divide(v, x)`: returns a vector
+* `vector.multiply(v, x)`: returns a scaled vector or Schur product
+* `vector.divide(v, x)`: returns a scaled vector or Schur quotient
Helper functions
-----------------
@@ -1971,11 +1971,13 @@ and `minetest.auth_reload` call the authetification handler.
* Returns `ObjectRef`, or `nil` if failed
* `minetest.get_player_by_name(name)`: Get an `ObjectRef` to a player
* `minetest.get_objects_inside_radius(pos, radius)`
+ * `radius`: using an euclidean metric
* `minetest.set_timeofday(val)`
* `val` is between `0` and `1`; `0` for midnight, `0.5` for midday
* `minetest.get_timeofday()`
* `minetest.get_gametime()`: returns the time, in seconds, since the world was created
* `minetest.find_node_near(pos, radius, nodenames)`: returns pos or `nil`
+ * `radius`: using a maximum metric
* `nodenames`: e.g. `{"ignore", "group:tree"}` or `"default:dirt"`
* `minetest.find_nodes_in_area(minp, maxp, nodenames)`: returns a list of positions
* returns as second value a table with the count of the individual nodes found
@@ -2039,7 +2041,7 @@ and `minetest.auth_reload` call the authetification handler.
* returns a table of 3D points representing a path from `pos1` to `pos2` or `nil`
* `pos1`: start position
* `pos2`: end position
- * `searchdistance`: number of blocks to search in each direction
+ * `searchdistance`: number of blocks to search in each direction using a maximum metric
* `max_jump`: maximum height difference to consider walkable
* `max_drop`: maximum height difference to consider droppable
* `algorithm`: One of `"A*_noprefetch"` (default), `"A*"`, `"Dijkstra"`