diff --git a/B12NumbersV3/B12Digit.pde b/B12NumbersV3/B12Digit.pde index c93afbe..6857184 100644 --- a/B12NumbersV3/B12Digit.pde +++ b/B12NumbersV3/B12Digit.pde @@ -13,11 +13,9 @@ class B12Digit{ B12Digit(char _c){ String valid = "+-*/.:"; // Defines valid input characters - if(inStr(valid, _c)){ - value = byte(_c); - }else{ - throw new IllegalArgumentException("B12Char only accepts \'+ - * / . :'"); - } + if(!inStr(valid, _c)){ throw new IllegalArgumentException("B12Char only accepts \'+ - * / . :'"); } + value = byte(_c); + refPos = new PVector(0,0); } // SETTERS @@ -32,7 +30,7 @@ class B12Digit{ // RENDER CHARACTERS void display(){ pushMatrix(); - translate(refPos.x,refPos.y); + translate(refPos.x,refPos.y); //<>// strokeWeight(1); noFill(); ellipseMode(CORNERS); diff --git a/B12NumbersV3/B12NumbersV3.pde b/B12NumbersV3/B12NumbersV3.pde index a0a8ad9..cd83acc 100644 --- a/B12NumbersV3/B12NumbersV3.pde +++ b/B12NumbersV3/B12NumbersV3.pde @@ -3,16 +3,24 @@ Beta version of a clock in base 12. by Nayan Sawyer started Mar 2022 - version 0.1.2 April 4 2022 + version 0.1.3 April 29 2022 Characters are a variation of Kaktovik Inupiaq numerals reversed and in base 12 instead of 20. I take no credit for the design. + + changelog 0.1.3 + - Deprecated B12Char by rolling it's code into B12Digit. + Makes for easier to handle arrays, and will hopefully + make implementing the math functionality much easier. + It appears that only Clock may need true refactoring to + make the most of this change. B12Int and B12Float seem + to be fine with simply swithing out the reference. */ public static int DECIMAL = 65; -Clock clock; +Clock clock; //<>// B12Digit p; B12Digit t; diff --git a/B12NumbersV3/Clock.pde b/B12NumbersV3/Clock.pde index 6af7fb0..71031da 100644 --- a/B12NumbersV3/Clock.pde +++ b/B12NumbersV3/Clock.pde @@ -4,7 +4,7 @@ class Clock { B12Int hours; B12Int minutes; B12Int seconds; - B12Digit sep; + B12Digit sep; // TODO Just deprecated B12Char. Refactor to single array of B12Digits? B12Int fill; int tmillis; //boolean initialized;