From ea20f59c449455b6b8519562f1c3a972b8ff388b Mon Sep 17 00:00:00 2001 From: Revar Desmera Date: Thu, 2 Apr 2020 18:26:46 -0700 Subject: [PATCH] Fix collinear() for cases when a==b. --- geometry.scad | 1 + version.scad | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/geometry.scad b/geometry.scad index 4717190..4131ee3 100644 --- a/geometry.scad +++ b/geometry.scad @@ -61,6 +61,7 @@ function _point_above_below_segment(point, edge) = // c = Third point. // eps = Acceptable variance. Default: `EPSILON` (1e-9) function collinear(a, b, c, eps=EPSILON) = + approx(a,b,eps=eps)? true : distance_from_line([a,b], c) < eps; diff --git a/version.scad b/version.scad index e3d7cbb..d50ace7 100644 --- a/version.scad +++ b/version.scad @@ -8,7 +8,7 @@ ////////////////////////////////////////////////////////////////////// -BOSL_VERSION = [2,0,253]; +BOSL_VERSION = [2,0,254]; // Section: BOSL Library Version Functions