From da1f2f9e032d228893b6eebac33758081296a56a Mon Sep 17 00:00:00 2001 From: Amanda Ghassaei <amandaghassaei@gmail.com> Date: Wed, 28 Jan 2015 14:10:02 -0500 Subject: [PATCH] neg number issue --- js/fea/dmaCell.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/fea/dmaCell.js b/js/fea/dmaCell.js index 7eb85b92..b6592bd6 100644 --- a/js/fea/dmaCell.js +++ b/js/fea/dmaCell.js @@ -51,8 +51,8 @@ position.x = indices.x*scale; position.y = indices.y*triHeight; position.z = indices.z*octHeight; - if (indices.y%2 == 1) position.x -= scale/2; - if (indices.z%2 == 1) position.y -= triHeight*4/3; + if (Math.abs(indices.y%2) == 1) position.x -= scale/2; + if (Math.abs(indices.z%2) == 1) position.y -= triHeight*4/3; return position; }; -- GitLab