752 {
753 if (samples.
empty())
return 0.0f;
754
755 float sumSquares = 0.0f;
756 for (
const auto&
sample : samples) {
757 float f =
static_cast<float>(
sample);
758 sumSquares += f * f;
759 }
760
761 return sqrtf(sumSquares / samples.size());
762}
bool empty() const FL_NO_EXCEPT
CRGB sample(const CRGB *grid, const XYMap &xyMap, float x, float y, SampleMode mode) FL_NO_EXCEPT
Sample a pixel from a 2D CRGB grid at floating-point coordinates.
float sqrtf(float value) FL_NO_EXCEPT