mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-01-17 22:28:16 +01:00
refactor: inner _learp
This commit is contained in:
parent
83242cb5fd
commit
5e8a053e0d
@ -1,11 +1,8 @@
|
||||
use <../util/lerp.scad>;
|
||||
function _lerp(v1, v2, amt) = let(v = v2 - v1) v1 + v * amt;
|
||||
|
||||
function interpolated_pt(p0, p1, threshold) =
|
||||
lerp(
|
||||
[p0.x, p0.y, p0.z],
|
||||
[p1.x, p1.y, p1.z],
|
||||
(threshold - p0.z) / (p1.z - p0.z)
|
||||
);
|
||||
let(p = _lerp(p0, p1, (threshold - p0.z) / (p1.z - p0.z)))
|
||||
[p.x, p.y, p.z];
|
||||
|
||||
/*
|
||||
Grid indexes
|
||||
|
Loading…
x
Reference in New Issue
Block a user