mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2024-12-29 16:29:40 +00:00
Changed lerp() formula to be less susceptible to FP rounding errors.
This commit is contained in:
parent
81210a2a95
commit
f64e16298d
1 changed files with 1 additions and 1 deletions
|
@ -52,7 +52,7 @@ function segs(r) = $fn>0?($fn>3?$fn:3):(ceil(max(min(360.0/$fa,abs(r)*2*PI/$fs),
|
|||
|
||||
|
||||
// Interpolate between two values or vectors. 0.0 <= u <= 1.0
|
||||
function lerp(a,b,u) = (b-a)*u + a;
|
||||
function lerp(a,b,u) = (1-u)*a + u*b;
|
||||
|
||||
|
||||
// Calculate hypotenuse length of 2D triangle.
|
||||
|
|
Loading…
Reference in a new issue