mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-01-01 09:49:45 +00:00
Fixed scalar approx()
This commit is contained in:
parent
668b6de199
commit
414f06df86
1 changed files with 1 additions and 1 deletions
|
@ -65,7 +65,7 @@ function constrain(v, minval, maxval) = min(maxval, max(minval, v));
|
||||||
// a = First value.
|
// a = First value.
|
||||||
// b = Second value.
|
// b = Second value.
|
||||||
// eps = The maximum allowed difference between `a` and `b` that will return true.
|
// eps = The maximum allowed difference between `a` and `b` that will return true.
|
||||||
function approx(a,b,eps=EPSILON) = let(c=a-b) (is_num(c)? c : norm(c)) <= eps;
|
function approx(a,b,eps=EPSILON) = let(c=a-b) (is_num(c)? abs(c) : norm(c)) <= eps;
|
||||||
|
|
||||||
|
|
||||||
// Function: min_index()
|
// Function: min_index()
|
||||||
|
|
Loading…
Reference in a new issue