1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-10 16:54:23 +02:00

not necessary

This commit is contained in:
Justin Lin
2019-06-11 15:30:45 +08:00
parent f47267c656
commit f34f2e0bbf

View File

@@ -1,17 +1,3 @@
function round_n(number, float_digits = 4) =
let(n = pow(10, float_digits))
round(number * n) / n;
function mul_round_pt(point, n) =
let(pt = point * n)
len(pt) == 2 ?
[round(pt[0]), round(pt[1])] :
[round(pt[0]), round(pt[1]), round(pt[2])];
function round_pts(points, float_digits = 4) =
let(n = pow(10, float_digits))
[for(pt = points) mul_round_pt(pt, n) / n];
module assertEqualPoint(expected, actual, epsilon = 0.0001) {
leng_expected = len(expected);
leng_actual = len(actual);
@@ -50,12 +36,3 @@ module assertEqualNum(expected, actual, epsilon = 0.0001) {
str("expected: ", expected, ", but: ", actual)
);
}
function mul_round_vector(vector, n) =
let(vt = vector * n)
[for(v = vt) round(v)];
function round_vectors(vectors, float_digits = 4) =
let(n = pow(10, float_digits))
[for(vt = vectors) mul_round_vector(vt, n) / n];