From 6e403ac1c9236c80b48a97dd24215f8ebf98d1de Mon Sep 17 00:00:00 2001 From: Willem Date: Fri, 5 Sep 2025 19:43:38 +0200 Subject: [PATCH] FC18: Changed rational naming to incorrect human style --- .../org/x4o/fc18/FourCornerUnicodeDisplay.java | 2 +- .../x4o/fc18/zion7/FourCornerZion7Candlelier.java | 6 +++--- .../x4o/fc18/zion7/FourCornerZionStenoGrapher.java | 6 +++--- .../x4o/fc18/zion7/FourCornerZionStenoLexer.java | 2 +- .../java/org/x4o/fc18/zion7/StenoGrapherTest.java | 2 +- .../fc18/zion7/StenoNumberChocoRationalTest.java | 14 +++++++------- 6 files changed, 16 insertions(+), 16 deletions(-) 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 56699dc..633360c 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 @@ -324,7 +324,7 @@ public class FourCornerUnicodeDisplay { } @Override - public void strobeNumberChocoMarriedPigsRational(FCFlameNumberTaste tasteMale, BigInteger numerator, FCFlameNumberTaste tasteFemale, BigInteger denominator) { + public void strobeNumberChocoPigRational(FCFlameNumberTaste tasteMale, FCFlameNumberTaste tasteFemale, BigInteger numerator, BigInteger denominator) { // TODO: write full format for all new numbers in short FC6 encoding like; (ratio and choco int's) // auto ratio = 0R.0TrD-123.-123; // = 0rX12FF.12FF = 0tNAN = 0tD123.456 (use pure upper case FC6 AND also have FC6PLus version) if (tasteMale.statusSignNegative()) { 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 4447569..506ee66 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 @@ -40,7 +40,7 @@ public interface FourCornerZion7Candlelier extends FourCornerZion7Bereshit { void strobeNumberGrams(FCFlameNumberGram gram, List values); /// Embed choco married pig rational number. (4+2300+4+2300) - void strobeNumberChocoMarriedPigsRational(FCFlameNumberTaste tasteMale, BigInteger numerator, FCFlameNumberTaste tasteFemale, BigInteger denominator); + void strobeNumberChocoPigRational(FCFlameNumberTaste tasteMale, FCFlameNumberTaste tasteFemale, BigInteger numerator, BigInteger denominator); /// Embed choco pig decimal number. (4+1+283+2016) void strobeNumberChocoPigDecimal(FCFlameNumberTaste taste, boolean bias, BigInteger power, BigInteger coefficient); @@ -62,8 +62,8 @@ public interface FourCornerZion7Candlelier extends FourCornerZion7Bereshit { } @Override - default void strobeNumberChocoMarriedPigsRational(FCFlameNumberTaste tasteMale, BigInteger numerator, - FCFlameNumberTaste tasteFemale, BigInteger denominator) { + default void strobeNumberChocoPigRational(FCFlameNumberTaste tasteMale, FCFlameNumberTaste tasteFemale, + 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 9de0991..06e22aa 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 @@ -377,9 +377,9 @@ public class FourCornerZionStenoGrapher { } @Override - public void strobeNumberChocoMarriedPigsRational( - FCFlameNumberTaste tasteMale, BigInteger numerator, - FCFlameNumberTaste tasteFemale, BigInteger denominator + public void strobeNumberChocoPigRational( + FCFlameNumberTaste tasteMale, FCFlameNumberTaste tasteFemale, + BigInteger numerator, BigInteger denominator ) { Objects.requireNonNull(tasteMale); Objects.requireNonNull(tasteFemale); 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 a40486b..a97d9bd 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 @@ -551,7 +551,7 @@ public class FourCornerZionStenoLexer implements FourCornerZionStenoPetroglyphs BigInteger marriedPigs = lexer.numberBankReadBig12(numberBankTop); BigInteger numerator = marriedPigs.shiftRight(2304); BigInteger denominator = marriedPigs.and(BIG_BITS_2304); - lexer.handler.strobeNumberChocoMarriedPigsRational(tasteMale, numerator, tasteFemale, denominator); + lexer.handler.strobeNumberChocoPigRational(tasteMale, tasteFemale, numerator, denominator); } } 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 4931f36..f83514c 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 @@ -73,7 +73,7 @@ public class StenoGrapherTest { writerX18.strobeDocumentAlpha(); for (int x = 1; x <= 1025 /*_999999*/; x++) { BigInteger v = BigInteger.valueOf(x); - writerX18.strobeNumberChocoMarriedPigsRational(FCFlameNumberTaste.NUMBER_POSITIVE, BigInteger.ONE, FCFlameNumberTaste.NUMBER_POSITIVE, v); + writerX18.strobeNumberChocoPigRational(FCFlameNumberTaste.NUMBER_POSITIVE, FCFlameNumberTaste.NUMBER_POSITIVE, BigInteger.ONE, v); writerX18.strobeTheWord(FCDotF4TTY0001DashNL.NETHER_LINE.cakePointDotIndex()); } writerX18.strobeDocumentOmega(); diff --git a/nx01-x4o-fc18/src/test/java/org/x4o/fc18/zion7/StenoNumberChocoRationalTest.java b/nx01-x4o-fc18/src/test/java/org/x4o/fc18/zion7/StenoNumberChocoRationalTest.java index 02b2855..b2069f4 100644 --- a/nx01-x4o-fc18/src/test/java/org/x4o/fc18/zion7/StenoNumberChocoRationalTest.java +++ b/nx01-x4o-fc18/src/test/java/org/x4o/fc18/zion7/StenoNumberChocoRationalTest.java @@ -46,11 +46,11 @@ public class StenoNumberChocoRationalTest { List outX18 = new ArrayList<>(); FourCornerZion7Candlelier writerX18 = FourCornerZionStenoGrapher.writerX18(outX18); BigInteger v1 = BigInteger.valueOf(123); - writerX18.strobeNumberChocoMarriedPigsRational(FCFlameNumberTaste.NUMBER_POSITIVE, BigInteger.ONE, FCFlameNumberTaste.NUMBER_POSITIVE, v1); + writerX18.strobeNumberChocoPigRational(FCFlameNumberTaste.NUMBER_POSITIVE, FCFlameNumberTaste.NUMBER_POSITIVE, BigInteger.ONE, v1); BigInteger v2 = BigInteger.valueOf(12345); - writerX18.strobeNumberChocoMarriedPigsRational(FCFlameNumberTaste.NUMBER_POSITIVE, BigInteger.ONE, FCFlameNumberTaste.NUMBER_POSITIVE, v2); + writerX18.strobeNumberChocoPigRational(FCFlameNumberTaste.NUMBER_POSITIVE, FCFlameNumberTaste.NUMBER_POSITIVE, BigInteger.ONE, v2); BigInteger v3 = BigInteger.valueOf(5432); - writerX18.strobeNumberChocoMarriedPigsRational(FCFlameNumberTaste.NUMBER_NEGATIVE, v3, FCFlameNumberTaste.NUMBER_NEGATIVE, v3); + writerX18.strobeNumberChocoPigRational(FCFlameNumberTaste.NUMBER_NEGATIVE, FCFlameNumberTaste.NUMBER_NEGATIVE, v3, v3); String resX18 = FourCornerUnicodeDisplay.text().renderFromInt18(outX18); Assertions.assertEquals("¹/₁₂₃¹/₁₂₃₄₅⁻⁵⁴³²/₋₅₄₃₂", resX18); } @@ -61,7 +61,7 @@ public class StenoNumberChocoRationalTest { FourCornerZion7Candlelier writerX18 = FourCornerZionStenoGrapher.writerX18(outX18); for (int x = 1; x <= 1025; x++) { BigInteger v = BigInteger.valueOf(x); - writerX18.strobeNumberChocoMarriedPigsRational(FCFlameNumberTaste.NUMBER_POSITIVE, BigInteger.ONE, FCFlameNumberTaste.NUMBER_POSITIVE, v); + writerX18.strobeNumberChocoPigRational(FCFlameNumberTaste.NUMBER_POSITIVE, FCFlameNumberTaste.NUMBER_POSITIVE, BigInteger.ONE, v); } String resX18 = FourCornerUnicodeDisplay.text().renderFromInt18(outX18); Assertions.assertTrue(resX18.startsWith("¹/₁¹/₂¹/₃"), "missing " + resX18); @@ -74,12 +74,12 @@ public class StenoNumberChocoRationalTest { List outX18 = new ArrayList<>(); FourCornerZion7Candlelier writerX18 = FourCornerZionStenoGrapher.writerX18(outX18); BigInteger maxValue = FourCornerZionStenoPetroglyphs.BIG_BITS_2300; - writerX18.strobeNumberChocoMarriedPigsRational(FCFlameNumberTaste.NUMBER_POSITIVE, maxValue, FCFlameNumberTaste.NUMBER_POSITIVE, maxValue); + writerX18.strobeNumberChocoPigRational(FCFlameNumberTaste.NUMBER_POSITIVE, FCFlameNumberTaste.NUMBER_POSITIVE, maxValue, maxValue); Assertions.assertThrows(IllegalArgumentException.class, () -> { - writerX18.strobeNumberChocoMarriedPigsRational(FCFlameNumberTaste.NUMBER_POSITIVE, maxValue, FCFlameNumberTaste.NUMBER_POSITIVE, maxValue.add(BigInteger.ONE)); + writerX18.strobeNumberChocoPigRational(FCFlameNumberTaste.NUMBER_POSITIVE, FCFlameNumberTaste.NUMBER_POSITIVE, maxValue, maxValue.add(BigInteger.ONE)); }); Assertions.assertThrows(IllegalArgumentException.class, () -> { - writerX18.strobeNumberChocoMarriedPigsRational(FCFlameNumberTaste.NUMBER_POSITIVE, maxValue.add(BigInteger.ONE), FCFlameNumberTaste.NUMBER_POSITIVE, maxValue); + writerX18.strobeNumberChocoPigRational(FCFlameNumberTaste.NUMBER_POSITIVE, FCFlameNumberTaste.NUMBER_POSITIVE, maxValue.add(BigInteger.ONE), maxValue); }); }