testClip function
Test-only access to clip for verifying value clamping behavior.
This function exposes clip for unit testing.
It clamps v to the range [lo, hi].
Implementation
@visibleForTesting
double testClip(double v, double lo, double hi) => clip(v, lo, hi);