From 6fbe42ba8f8f38ae25816cdf367dce44dc3b680a Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Mon, 13 May 2019 08:27:02 +0800 Subject: [PATCH] if a== 0 do_noting --- src/m_rotation.scad | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/m_rotation.scad b/src/m_rotation.scad index 785bc421..22fbad82 100644 --- a/src/m_rotation.scad +++ b/src/m_rotation.scad @@ -78,4 +78,9 @@ function _xyz_rotation(a) = _m_zRotation(ang[2]) * _m_yRotation(ang[1]) * _m_xRotation(ang[0]); function m_rotation(a, v) = - v == undef ? _xyz_rotation(a) : _q_rotation(a, v); \ No newline at end of file + a == 0 ? [ + [1, 0, 0, 0], + [0, 1, 0, 0], + [0, 0, 1, 0], + [0, 0, 0, 1] + ] : (v == undef ? _xyz_rotation(a) : _q_rotation(a, v)); \ No newline at end of file