Difference between revisions of "Mods/vector extras"

From Minetest Developer Wiki
Jump to navigation Jump to search
m (nl)
(Redirected page to User:Hybrid Dog#vector extras)
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
{| class="wikitable collapsible sortable"
+
#REDIRECT [[User:Hybrid_Dog#vector_extras]]
! Function
 
! Return value
 
! Comments
 
! Status
 
|-
 
|<source enclose="none">vector.line([pos, dir[, range]])</source>
 
| table of [[vector]]s
 
| dir can be following:
 
* a direction
 
* a [[position]] (range not needed)
 
| works
 
|-
 
|<source enclose="none">vector.fine_line([pos, dir[, range], scale])</source>
 
| table of [[vector]]s
 
|
 
* like vector.line but more precise
 
* needed for not round positions
 
| works but slow
 
|-
 
|<source enclose="none">vector.straightdelay([s, v[, a]])</source>
 
| number
 
|
 
* s = length
 
* v = velocity
 
* a = acceleration (optional)
 
| works
 
|-
 
|<source enclose="none">vector.sun_dir(t)</source>
 
| [[vector]]
 
|
 
* t = timeofday
 
| doesn't work right yet
 
|-
 
|<source enclose="none">vector.inside(pos, minp, maxp)</source>
 
| bool
 
| returns true if pos is inside or on the corners of minp and maxp
 
| untested
 
|-
 
|<source enclose="none">vector.minmax(p1, p2)</source>
 
| [[vector]], [[vector]]
 
| the first [[vector]]'s x, y and z are smaller than the second one's
 
| untested
 
|-
 
|<source enclose="none">vector.move(p1, p2, s)</source>
 
| [[vector]]
 
|
 
* s = length
 
* moves s to p2 from p1
 
* made for rubenwardy
 
| untested
 
|}
 
 
 
[[Category:Mod]]
 

Latest revision as of 14:40, 17 June 2015