Difference between revisions of "Mods/vector extras"

From Minetest Developer Wiki
Jump to navigation Jump to search
(Redirected page to User:Hybrid Dog#vector extras)
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
<source>vector.line([pos, dir[, range]])</source>
+
#REDIRECT [[User:Hybrid_Dog#vector_extras]]
→ table of vectors
 
 
 
dir can be following
 
* a direction
 
* a position (range not needed)
 
 
 
 
 
<source>vector.fine_line([pos, dir[, range], scale])</source>
 
→ table of vectors
 
* like vector.line but more precise
 
* needed for not round positions
 
 
 
 
 
<source>vector.straightdelay([s, v[, a]])</source>
 
→ number
 
* s = length
 
* v = velocity
 
* a = acceleration (optional)
 
 
 
 
 
<source>vector.sun_dir(t)</source>
 
→ vector
 
* t = timeofday
 
doesn't work right yet
 
 
 
 
 
<source>vector.inside(pos, minp, maxp)</source>
 
→ bool
 
untested
 
 
 
 
 
<source>vector.minmax(p1, p2)</source>
 
→ vector, vector
 
the first vector's x, y and z are smaller than the second one's
 
untested
 
 
 
<source>vector.move(p1, p2, s)</source>
 
→ vector
 
* s = length
 
moves s to p2 from p1, made for rubenwardy
 

Latest revision as of 14:40, 17 June 2015