Problem
A cluster of small polish items surfaced during a code-quality review. None is urgent, but collectively they affect how clean the library reads as teaching material. Tracking them together.
Code hygiene
Robustness
Teaching-code consistency
Repo niceties (optional)
Problem
A cluster of small polish items surfaced during a code-quality review. None is urgent, but collectively they affect how clean the library reads as teaching material. Tracking them together.
Code hygiene
GraphLine::_sampleTotalis declared and honestly commented "unused currently" (GraphLine.hpp). Remove it rather than ship documented dead state.Serial.printlns left in source:FileUtils.hpp(the "ends with"/"does NOT end with" lines) andShape.hpp("We are in overlaps shape!"). A published library should be clean of these.@param/@returnlines have no text and read as auto-generated boilerplate (e.g.Shape::distanceparams;Circle::overlaps@return true/@return false; many graph getters). Fill or drop them.Robustness
MovingAverageFilterhas no guard onwindowSize. Doc says "must be > 0" butnew int[windowSize]andgetAverage()'s/ _windowSizewill misbehave for 0/negative. Add a guard or at least an explicit "undefined if <= 0" note.ScrollingLineGraphbuffer sizing_bufferSize = _widthGraph - _xGraph;has no guard againstwidth < xGraph(negative allocation). Low real-world risk.Teaching-code consistency
Shape::distanceusespow(dx, 2)— on AVR that's a slow float call;dx*dx + dy*dyis faster, exact, and a nice teaching point. Called per-frame in circle collisions.CollisionTest.inoneverdelete[]s_targetShapes. Harmless on a microcontroller (lives for program lifetime) but, in code that explicitly demonstratesnew, model the cleanup rule taught elsewhere.Pong.ino,CollisionTest.ino, others) still use the old@jonfroehlichstyle, not the shared footer the.hppheaders adopted — finishes the footer-alignment work.Repo niceties (optional)
CHANGELOG.md(releases are now versioned — 0.2.0).CONTRIBUTING.md.