diff --git a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/FourCornerUnicodeDisplay.java b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/FourCornerUnicodeDisplay.java index 616fabf..8d3b25b 100644 --- a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/FourCornerUnicodeDisplay.java +++ b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/FourCornerUnicodeDisplay.java @@ -237,7 +237,7 @@ public class FourCornerUnicodeDisplay { } @Override - public void strobeNCR1632(BigInteger denominator, BigInteger numerator) { + public void strobeNCR1632(BigInteger numerator, BigInteger denominator) { List math = new ArrayList<>(); FourCornerRecipe.toScriptSuperX18(math, numerator); math.add(FCDotCDC1604DashP6.NY02_BAR_V_RIGHT.ordinal()); diff --git a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/zion7/FourCornerZion7Candlelier.java b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/zion7/FourCornerZion7Candlelier.java index 00b9cb4..f462624 100644 --- a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/zion7/FourCornerZion7Candlelier.java +++ b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/zion7/FourCornerZion7Candlelier.java @@ -44,7 +44,7 @@ public interface FourCornerZion7Candlelier extends FourCornerZion7AlphaOmega { //void strobeWordDozeger(BigInteger value); // up to 192 bit integer /// 1152 bit fractions of two 576 bit numbers. - void strobeNCR1632(BigInteger denominator, BigInteger numerator); + void strobeNCR1632(BigInteger numerator, BigInteger denominator); /// Octal sand walker, with an 72 to 576 bit mime-type rhythm header. void strobeSandWalker(List rhythm); @@ -66,7 +66,7 @@ public interface FourCornerZion7Candlelier extends FourCornerZion7AlphaOmega { } @Override - default void strobeNCR1632(BigInteger denominator, BigInteger numerator) { + default void strobeNCR1632(BigInteger numerator, BigInteger denominator) { } @Override diff --git a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/zion7/FourCornerZionStenoGrapher.java b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/zion7/FourCornerZionStenoGrapher.java index bcb27cf..932653d 100644 --- a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/zion7/FourCornerZionStenoGrapher.java +++ b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/zion7/FourCornerZionStenoGrapher.java @@ -85,7 +85,7 @@ public class FourCornerZionStenoGrapher { } @Override - public void strobeNCR1632(BigInteger denominator, BigInteger numerator) { + public void strobeNCR1632(BigInteger numerator, BigInteger denominator) { if (denominator.equals(BigInteger.ZERO)) { throw new IllegalArgumentException("The denominator value ZERO is not allowed."); } diff --git a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/zion7/FourCornerZionStenoLexer.java b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/zion7/FourCornerZionStenoLexer.java index 665d41c..baf3044 100644 --- a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/zion7/FourCornerZionStenoLexer.java +++ b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/zion7/FourCornerZionStenoLexer.java @@ -198,7 +198,7 @@ public class FourCornerZionStenoLexer { for (int i = 0; i < numeratorBank.length; i++) { numerator = numerator.add(BigInteger.valueOf(numeratorBank[i]).shiftLeft(i * 9)); } - handler.strobeNCR1632(denominator, numerator); + handler.strobeNCR1632(numerator, denominator); // reset the bank after each fire for (int i = 0; i < denominatorBank.length; i++) { denominatorBank[i] = 0; diff --git a/nx01-x4o-fc18/src/test/java/org/x4o/fc18/zion7/StenoGrapherTest.java b/nx01-x4o-fc18/src/test/java/org/x4o/fc18/zion7/StenoGrapherTest.java index 1a86102..f88abd7 100644 --- a/nx01-x4o-fc18/src/test/java/org/x4o/fc18/zion7/StenoGrapherTest.java +++ b/nx01-x4o-fc18/src/test/java/org/x4o/fc18/zion7/StenoGrapherTest.java @@ -62,11 +62,11 @@ public class StenoGrapherTest { FourCornerZion7Candlelier writerX06 = FourCornerZionStenoGrapher.writerX06(outX06); FourCornerZion7Candlelier writerX18 = FourCornerZionStenoGrapher.writerX18(outX18); BigInteger v1 = BigInteger.valueOf(123); - writerX06.strobeNCR1632(v1, BigInteger.ONE); - writerX18.strobeNCR1632(v1, BigInteger.ONE); + writerX06.strobeNCR1632(BigInteger.ONE, v1); + writerX18.strobeNCR1632(BigInteger.ONE, v1); BigInteger v2 = BigInteger.valueOf(12345); - writerX06.strobeNCR1632(v2, BigInteger.ONE); - writerX18.strobeNCR1632(v2, BigInteger.ONE); + writerX06.strobeNCR1632(BigInteger.ONE, v2); + writerX18.strobeNCR1632(BigInteger.ONE, v2); String resX06 = FourCornerUnicodeDisplay.text().renderFromInt18(outX06); String resX18 = FourCornerUnicodeDisplay.text().renderFromInt18(outX18); Assertions.assertEquals(resX18, resX06); @@ -81,8 +81,8 @@ public class StenoGrapherTest { FourCornerZion7Candlelier writerX18 = FourCornerZionStenoGrapher.writerX18(outX18); for (int x = 1; x <= 1025; x++) { BigInteger v = BigInteger.valueOf(x); - writerX06.strobeNCR1632(v, BigInteger.ONE); - writerX18.strobeNCR1632(v, BigInteger.ONE); + writerX06.strobeNCR1632(BigInteger.ONE, v); + writerX18.strobeNCR1632(BigInteger.ONE, v); } String resX06 = FourCornerUnicodeDisplay.text().renderFromInt18(outX06); String resX18 = FourCornerUnicodeDisplay.text().renderFromInt18(outX18); @@ -104,17 +104,17 @@ public class StenoGrapherTest { BigInteger maxValue = new BigInteger("FFFFFFFFFFFFFFFFFF"+"FFFFFFFFFFFFFFFFFF"+"FFFFFFFFFFFFFFFFFF"+"FFFFFFFFFFFFFFFFFF"+"FFFFFFFFFFFFFFFFFF"+"FFFFFFFFFFFFFFFFFF"+"FFFFFFFFFFFFFFFFFF"+"FFFFFFFFFFFFFFFFFF", 16); writerX06.strobeNCR1632(maxValue, maxValue); Assertions.assertThrows(IllegalArgumentException.class, () -> { - writerX06.strobeNCR1632(maxValue.add(BigInteger.ONE), maxValue); + writerX06.strobeNCR1632(maxValue, maxValue.add(BigInteger.ONE)); }); Assertions.assertThrows(IllegalArgumentException.class, () -> { - writerX06.strobeNCR1632(maxValue, maxValue.add(BigInteger.ONE)); + writerX06.strobeNCR1632(maxValue.add(BigInteger.ONE), maxValue); }); writerX18.strobeNCR1632(maxValue, maxValue); Assertions.assertThrows(IllegalArgumentException.class, () -> { - writerX18.strobeNCR1632(maxValue.add(BigInteger.ONE), maxValue); + writerX18.strobeNCR1632(maxValue, maxValue.add(BigInteger.ONE)); }); Assertions.assertThrows(IllegalArgumentException.class, () -> { - writerX18.strobeNCR1632(maxValue, maxValue.add(BigInteger.ONE)); + writerX18.strobeNCR1632(maxValue.add(BigInteger.ONE), maxValue); }); } }