Conversation
…etic on both platforms The level adopted shared arithmetic (ryanbr#2165), but the ratio tile one line below still went through each platform's printf family — which round exact halves in OPPOSITE directions (Java %.1f half-up, C %.1f half-even), so an exact quotient such as 9/4 spelled "2.3" on Android and "2.2" on iOS. Unlike the logistic-squashed level, a quotient can land on exact binary fractions. StressTrace gains formatRatio (the level's tenths arithmetic, floor brace, no domain ceiling) on both platforms, both ratio tiles route through it, and the pins land on both sides — including the exact-quarter formatLevel trio the Kotlin suite was missing, since each side's pin guards its own direction. Refs ryanbr#2167
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Went to implement #2167 and found the filed gap already closed on
main— every level surfaceroutes through the shared
formatLeveland the Swift suite pins the three exact quarters. But theLF/HF ratio tile one line below the level tiles still prints through the two platforms' printf
families, and those round exact halves in opposite directions: Java's
%.1frounds half up,C's rounds half to even. So an exact quotient such as 9/4 spells "2.3" on Android and "2.2" on iOS
— and unlike the logistic-squashed level, a quotient genuinely can land on an exact binary
fraction.
Change
StressTrace.formatRatioon both platforms: the level's tenths arithmetic and floor brace,without the stress-domain ceiling — a sympathetic-leaning ratio above 3 must print as itself,
not as "3.0".
StressView.swift,StressScreen.kt) route through it; that removes the lastprintf-family formatter from the stress surfaces.
formatLeveltrio the Kotlin suite was missing —the Swift suite already pinned it, and each side's pin guards its own direction.
Verification
StrandTests/StressTraceTestsrun green locally underxcodebuild … -only-testing:StrandTests/StressTraceTests teston the macOS destination (themacOS app module compiles
StressTrace.swiftperproject.yml, so this covers the sharedsurface).
android.ymlcompiles and runsStressTraceTestonthis PR; the same commit is already green on my fork's CI.
Refs #2167.