MCPcopy Create free account
hub / github.com/FastLED/FastLED / lround_impl_double

Function lround_impl_double

src/fl/math/math.cpp.hpp:372–379  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

370}
371
372long lround_impl_double(double value) {
373#if FL_MATH_USE_LIBM
374 return ::lround(value);
375#else
376 if (value >= 0.0) return static_cast<long>(value + 0.5);
377 return static_cast<long>(value - 0.5);
378#endif
379}
380
381// Arduino.h defines `round` as a macro, so we temporarily hide it.
382#pragma push_macro("round")

Callers 2

round_impl_doubleFunction · 0.85
lroundFunction · 0.85

Calls 1

lroundFunction · 0.85

Tested by

no test coverage detected