Clean up code comments and add algorithm citations - #17
Merged
Conversation
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.
Summary
Full sweep of every comment in src/ (54 files, +432/−856):
FrameTimerdoc described the pre-flicker-fix architecture;frame_bufferclaimed double-buffering that doesn't exist;max_brightnessdocs conflated the internal white-point divisor with the user-facing gain;dither::max_valuedoc was off by the actual semantics;local_variancereturns a standard deviation;path_continuityis a flood-fill region-size proxy, not path tracing; nonexistentopen_exclusivereference removed# Argumentsblocks restating signatures → one prose sentence with the units/semantics that mattersimulation; Miranda, Adamatzky & Jones 2011 (doi:10.1016/S1672-6529(11)60016-4) inaudio; Ottosson 2020 OKLab post inpalette.rs/gradients.rs(incl. an honest note that the red-row M/S constants predate the 2021 matrix update); Floyd & Steinberg 1976 inerror_diffusion.rs; Bayer 1973 indither.rsTwo sanctioned user-facing string fixes (not comments): placeholder
yourusernameURL → real repo;--quadranthelp claimed "4× vertical resolution" (it's 2×2 subpixels per cell).Verification
cargo fmt --check,cargo clippy -- -D warnings(default + all-features)cargo test --lib752 passed,--all-features764, doctests 19, visual regression 46 — goldens untouchedKnown issues found but out of scope (comment-only PR)
--helprenders constant paths instead of values for ~25 flags (stringify!misuse), e.g.[default: population::DEFAULT_POPULATION]--pause-stylehelp lists 8 of 12 accepted styles; clap default ("minimal") disagrees withArgs::default()(Vignette)--decayhelp says 0.0-1.0; validated range is 0.5-0.9999png.rstimestamp "uniqueness" readssubsec_nanos()of a freshInstant(~0)