From 2c7442a76a816d3ab02f58d8d713c0babad7d393 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Sat, 16 Apr 2022 12:05:07 +0800 Subject: [PATCH] refactor: use util/lerp.scad --- src/_impl/_contours_impl.scad | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/_impl/_contours_impl.scad b/src/_impl/_contours_impl.scad index 81199ea8..d92f3bd0 100644 --- a/src/_impl/_contours_impl.scad +++ b/src/_impl/_contours_impl.scad @@ -1,7 +1,7 @@ -function _lerp(v1, v2, amt) = v1 + (v2 - v1) * amt; +use <../util/lerp.scad>; function interpolated_pt(p0, p1, threshold) = - let(p = _lerp(p0, p1, (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]; /*