Updated version # and added changelog

Also squashed a bug with the second B12Digit constructor not filling initializing refPos.
This commit is contained in:
61616
2022-04-29 18:20:38 -04:00
parent 7cdcddd287
commit 64790b77dd
3 changed files with 15 additions and 9 deletions

View File

@@ -13,11 +13,9 @@ class B12Digit{
B12Digit(char _c){ B12Digit(char _c){
String valid = "+-*/.:"; // Defines valid input characters String valid = "+-*/.:"; // Defines valid input characters
if(inStr(valid, _c)){ if(!inStr(valid, _c)){ throw new IllegalArgumentException("B12Char only accepts \'+ - * / . :'"); }
value = byte(_c); value = byte(_c);
}else{ refPos = new PVector(0,0);
throw new IllegalArgumentException("B12Char only accepts \'+ - * / . :'");
}
} }
// SETTERS // SETTERS
@@ -32,7 +30,7 @@ class B12Digit{
// RENDER CHARACTERS // RENDER CHARACTERS
void display(){ void display(){
pushMatrix(); pushMatrix();
translate(refPos.x,refPos.y); translate(refPos.x,refPos.y); //<>//
strokeWeight(1); strokeWeight(1);
noFill(); noFill();
ellipseMode(CORNERS); ellipseMode(CORNERS);

View File

@@ -3,16 +3,24 @@
Beta version of a clock in base 12. Beta version of a clock in base 12.
by Nayan Sawyer by Nayan Sawyer
started Mar 2022 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 Characters are a variation of Kaktovik Inupiaq numerals
reversed and in base 12 instead of 20. I take no credit reversed and in base 12 instead of 20. I take no credit
for the design. 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; public static int DECIMAL = 65;
Clock clock; Clock clock; //<>//
B12Digit p; B12Digit p;
B12Digit t; B12Digit t;

View File

@@ -4,7 +4,7 @@ class Clock {
B12Int hours; B12Int hours;
B12Int minutes; B12Int minutes;
B12Int seconds; B12Int seconds;
B12Digit sep; B12Digit sep; // TODO Just deprecated B12Char. Refactor to single array of B12Digits?
B12Int fill; B12Int fill;
int tmillis; int tmillis;
//boolean initialized; //boolean initialized;