From c7b1c742925fa74d9211c172e3ad7b9e382fb723 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Mon, 27 Jan 2020 08:54:17 +0800 Subject: [PATCH] refactor --- .../__m_rotation.scad => _impl/_m_rotation_impl.scad} | 2 +- src/matrix/m_rotation.scad | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename src/matrix/{__comm__/__m_rotation.scad => _impl/_m_rotation_impl.scad} (97%) diff --git a/src/matrix/__comm__/__m_rotation.scad b/src/matrix/_impl/_m_rotation_impl.scad similarity index 97% rename from src/matrix/__comm__/__m_rotation.scad rename to src/matrix/_impl/_m_rotation_impl.scad index be8724ae..0bb34043 100644 --- a/src/matrix/__comm__/__m_rotation.scad +++ b/src/matrix/_impl/_m_rotation_impl.scad @@ -62,7 +62,7 @@ function __m_rotation_xyz_rotation(a) = let(ang = __to_ang_vect(a)) __m_rotation_zRotation(ang[2]) * __m_rotation_yRotation(ang[1]) * __m_rotation_xRotation(ang[0]); -function __m_rotation(a, v) = +function _m_rotation_impl(a, v) = (a == 0 || a == [0, 0, 0] || a == [0] || a == [0, 0]) ? [ [1, 0, 0, 0], [0, 1, 0, 0], diff --git a/src/matrix/m_rotation.scad b/src/matrix/m_rotation.scad index 46385fe2..fbd946bd 100644 --- a/src/matrix/m_rotation.scad +++ b/src/matrix/m_rotation.scad @@ -8,6 +8,6 @@ * **/ -use ; +use ; -function m_rotation(a, v) = __m_rotation(a, v); \ No newline at end of file +function m_rotation(a, v) = _m_rotation_impl(a, v); \ No newline at end of file