1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-24 15:22:53 +02:00
This commit is contained in:
Justin Lin
2020-02-26 12:37:57 +08:00
parent 5c93a7d6c9
commit 0b920df2cb
2 changed files with 2 additions and 6 deletions

View File

@@ -1,2 +0,0 @@
function _convex_center_p_sum(lt, leng, i = 0) =
i == leng ? [0, 0, 0] : lt[i] + _convex_center_p_sum(lt, leng, i + 1);

View File

@@ -1,5 +1,3 @@
use <experimental/_impl/_convex_center_p_impl.scad>;
use <experimental/sum.scad>;
function convex_center_p(points) =
let(leng = len(points))
_convex_center_p_sum(points, leng) / leng;
function convex_center_p(points) = sum(points) / len(points);