From 58880473dabc3caa207b2a9ec5e6ff2cedf9dfad Mon Sep 17 00:00:00 2001 From: Revar Desmera Date: Mon, 8 Apr 2019 18:58:11 -0700 Subject: [PATCH] Added regression tests for rotate_points3d() --- tests/test_math.scad | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_math.scad b/tests/test_math.scad index f812e8b..c151024 100644 --- a/tests/test_math.scad +++ b/tests/test_math.scad @@ -617,6 +617,8 @@ module test_rotate_points3d() { assert(rotate_points3d(pts, 90, axis=V_RIGHT) == [[0,-1,0], [0,0,1], [1,0,0], [0,1,0], [0,0,-1], [-1,0,0]]); assert(rotate_points3d(pts, from=V_UP, to=V_BACK) == [[0,1,0], [0,0,-1], [1,0,0], [0,-1,0], [0,0,1], [-1,0,0]]); assert(rotate_points3d(pts, 90, from=V_UP, to=V_BACK), [[0,1,0], [-1,0,0], [0,0,-1], [0,-1,0], [1,0,0], [0,0,1]]); + assert(rotate_points3d(pts, from=V_UP, to=V_UP*2) == [[0,0,1], [0,1,0], [1,0,0], [0,0,-1], [0,-1,0], [-1,0,0]]); + assert(rotate_points3d(pts, from=V_UP, to=V_DOWN*2) == [[0,0,-1], [0,1,0], [-1,0,0], [0,0,1], [0,-1,0], [1,0,0]]); } test_rotate_points3d();