Difference between revisions of "Mods/vector extras"
Jump to navigation
Jump to search
Hybrid Dog (talk | contribs) |
Hybrid Dog (talk | contribs) |
||
Line 9: | Line 9: | ||
| dir can be following | | dir can be following | ||
* a direction | * a direction | ||
− | * a position (range not needed) | + | * a [[position]] (range not needed) |
| works | | works | ||
|- | |- | ||
Line 28: | Line 28: | ||
|- | |- | ||
|<source enclose="none">vector.sun_dir(t)</source> | |<source enclose="none">vector.sun_dir(t)</source> | ||
− | | vector | + | | [[vector]] |
| | | | ||
* t = timeofday | * t = timeofday | ||
Line 39: | Line 39: | ||
|- | |- | ||
|<source enclose="none">vector.minmax(p1, p2)</source> | |<source enclose="none">vector.minmax(p1, p2)</source> | ||
− | | vector, vector | + | | [[vector]], [[vector]] |
| the first vector's x, y and z are smaller than the second one's | | the first vector's x, y and z are smaller than the second one's | ||
| untested | | untested | ||
|- | |- | ||
|<source enclose="none">vector.move(p1, p2, s)</source> | |<source enclose="none">vector.move(p1, p2, s)</source> | ||
− | | vector | + | | [[vector]] |
| | | | ||
* s = length | * s = length |
Revision as of 19:08, 24 February 2014
Function | Return value | Comments | Status |
---|---|---|---|
vector.line([pos, dir[, range]])
|
table of vectors | dir can be following
|
works |
vector.fine_line([pos, dir[, range], scale])
|
table of vectors |
|
works but slow |
vector.straightdelay([s, v[, a]])
|
number |
|
works |
vector.sun_dir(t)
|
vector |
|
doesn't work right yet |
vector.inside(pos, minp, maxp)
|
bool | returns true if pos is inside or on the corners of minp and maxp | untested |
vector.minmax(p1, p2)
|
vector, vector | the first vector's x, y and z are smaller than the second one's | untested |
vector.move(p1, p2, s)
|
vector |
|
untested |