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

Function ceil_impl_float

src/fl/math/math.cpp.hpp:61–67  ·  view source on GitHub ↗

Standalone ceil implementation for float

Source from the content-addressed store, hash-verified

59
60// Standalone ceil implementation for float
61float ceil_impl_float(float value) {
62 if (value <= 0.0f) {
63 return static_cast<float>(static_cast<int>(value));
64 }
65 int i = static_cast<int>(value);
66 return static_cast<float>(i + (value != static_cast<float>(i) ? 1 : 0));
67}
68
69// Standalone ceil implementation for double
70double ceil_impl_double(double value) {

Callers 3

fmod_impl_floatFunction · 0.85
ceilfFunction · 0.85
ceilFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected