Difference between revisions of "Mods/vector extras"
Jump to navigation
Jump to search
Hybrid Dog (talk | contribs) |
Hybrid Dog (talk | contribs) |
||
Line 18: | Line 18: | ||
* v = velocity | * v = velocity | ||
* a = acceleration (optional) | * 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 |
Revision as of 18:52, 24 February 2014
vector.line([pos, dir[, range]])
→ table of vectors
dir can be following
- a direction
- a position (range not needed)
vector.fine_line([pos, dir[, range], scale])
→ table of vectors
- like vector.line but more precise
- needed for not round positions
vector.straightdelay([s, v[, a]])
→ number
- s = length
- v = velocity
- a = acceleration (optional)
vector.sun_dir(t)
→ vector
- t = timeofday
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
- s = length
moves s to p2 from p1, made for rubenwardy