Difference between revisions of "Mods/vector extras"
Jump to navigation
Jump to search
Hybrid Dog (talk | contribs) |
Hybrid Dog (talk | contribs) (use a table) |
||
Line 1: | Line 1: | ||
− | <source>vector.line([pos, dir[, range]])</source> | + | {| class="wikitable collapsible sortable" |
− | + | ! Function | |
− | + | ! Return value | |
− | dir can be following | + | ! Comments |
+ | |- | ||
+ | |<source enclose="none">vector.line([pos, dir[, range]])</source> | ||
+ | | table of [[vector]]s | ||
+ | | dir can be following | ||
* a direction | * a direction | ||
* a position (range not needed) | * a position (range not needed) | ||
− | + | |- | |
− | + | |<source enclose="none">vector.fine_line([pos, dir[, range], scale])</source> | |
− | <source>vector.fine_line([pos, dir[, range], scale])</source> | + | | table of [[vector]]s |
− | + | | | |
* like vector.line but more precise | * like vector.line but more precise | ||
* needed for not round positions | * needed for not round positions | ||
− | + | |- | |
− | + | |<source enclose="none">vector.straightdelay([s, v[, a]])</source> | |
− | <source>vector.straightdelay([s, v[, a]])</source> | + | | number |
− | + | | | |
* s = length | * s = length | ||
* v = velocity | * v = velocity | ||
* a = acceleration (optional) | * a = acceleration (optional) | ||
− | + | |- | |
− | + | |<source enclose="none">vector.sun_dir(t)</source> | |
− | <source>vector.sun_dir(t)</source> | + | | vector |
− | + | | | |
* t = timeofday | * t = timeofday | ||
doesn't work right yet | doesn't work right yet | ||
− | + | |- | |
− | + | |<source enclose="none">vector.inside(pos, minp, maxp)</source> | |
− | <source>vector.inside(pos, minp, maxp)</source> | + | | bool |
− | + | | 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 | untested | ||
− | + | |- | |
− | + | |<source enclose="none">vector.move(p1, p2, s)</source> | |
− | + | | vector | |
− | + | | | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | <source>vector.move(p1, p2, s)</source> | ||
− | |||
* s = length | * s = length | ||
+ | * moves s to p2 from p1, made for rubenwardy | ||
+ | * untested | ||
+ | |} | ||
− | + | [[Category:Mod]] |
Revision as of 19:01, 24 February 2014
Function | Return value | Comments |
---|---|---|
vector.line([pos, dir[, range]])
|
table of vectors | dir can be following
|
vector.fine_line([pos, dir[, range], scale])
|
table of vectors |
|
vector.straightdelay([s, v[, a]])
|
number |
|
vector.sun_dir(t)
|
vector |
doesn't work right yet |
vector.inside(pos, minp, maxp)
|
bool | 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 |
|