1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-13 18:24:28 +02:00

use built-in norm

This commit is contained in:
Justin Lin
2019-05-04 08:39:41 +08:00
parent af7e39a97e
commit f42a51d896
2 changed files with 1 additions and 8 deletions

View File

@@ -1,6 +0,0 @@
function __length_between(p1, p2) =
let(
dx = p2[0] - p1[0],
dy = p2[1] - p1[1],
dz = p2[2] - p1[2]
) sqrt(pow(dx, 2) + pow(dy, 2) + pow(dz, 2));

View File

@@ -9,7 +9,6 @@
**/
include <__private__/__to3d.scad>;
include <__private__/__length_between.scad>;
include <__private__/__polytransversals.scad>;
include <__private__/__reverse.scad>;
@@ -34,7 +33,7 @@ function _shape_path_first_stroke(stroke_pts, path_pts) =
function _shape_path_extend_stroke(stroke_pts, p1, p2, scale_step, i) =
let(
leng = __length_between(__to3d(p1), __to3d(p2)),
leng = norm(__to3d(p2) - __to3d(p1)),
a = _shape_path_extend_az(p1, p2)
)
[