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

Function ceil_impl_double

src/fl/math/math.cpp.hpp:70–76  ·  view source on GitHub ↗

Standalone ceil implementation for double

Source from the content-addressed store, hash-verified

68
69// Standalone ceil implementation for double
70double ceil_impl_double(double value) {
71 if (value <= 0.0) {
72 return static_cast<double>(static_cast<long long>(value));
73 }
74 long long i = static_cast<long long>(value);
75 return static_cast<double>(i + (value != static_cast<double>(i) ? 1 : 0));
76}
77
78// Standalone exp implementation using Taylor series
79// e^x ≈ 1 + x + x²/2! + x³/3! + x⁴/4! + ...

Callers 2

fmod_impl_doubleFunction · 0.85
ceilFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected