From c275019aec47084549b6cec29c8d45ce316321d9 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Thu, 28 Jul 2016 09:04:22 -0400 Subject: [PATCH] magic 3 -> S2.FACE_BITS --- src/s2geometry.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/s2geometry.js b/src/s2geometry.js index c28087e..9c870ab 100644 --- a/src/s2geometry.js +++ b/src/s2geometry.js @@ -333,7 +333,7 @@ S2.fromFacePosLevel = function (faceN, posS, levelN) { posB = '0' + posB; } var bin = Long.fromString(faceN.toString(10), true, 10).toString(2); - while (bin.length < 3) { + while (bin.length < S2.FACE_BITS) { bin = '0' + bin; } bin += posB;