Math Utilities
General purpose math functions.
etc.lerp2d
Usage:etc.lerp2d(x1, y1, x2, y2, interval)
Interpolate
interval
amount between the two points provided. If the interval is a negative number, it will instead be used as a positive portion of the distance between the points (for example, interval = -0.5
will return the point halfway between the initial two).
etc.lerp3d
Usage:etc.lerp3d(v1, v2, interval)
Interpolate
interval
amount between the two vector objects. These must be valid Minetest vectors with the appropriate metatable. If the interval is a negative number, it will instead be used as a positive portion of the distance between the points (for example, interval = -0.5
will return the point halfway between the initial two).