mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-22 14:23:23 +02:00
add lerp
This commit is contained in:
6
src/util/lerp.scad
Normal file
6
src/util/lerp.scad
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
function lerp(p0, p1, amt) =
|
||||||
|
let(
|
||||||
|
v = p1 - p0,
|
||||||
|
leng = len(p0)
|
||||||
|
)
|
||||||
|
[for(i = 0; i < leng; i = i + 1) p0[i] + v[i] * amt];
|
Reference in New Issue
Block a user