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

Function floor_impl_float

src/fl/math/math.cpp.hpp:43–49  ·  view source on GitHub ↗

Standalone floor implementation for float

Source from the content-addressed store, hash-verified

41
42// Standalone floor implementation for float
43float floor_impl_float(float value) {
44 if (value >= 0.0f) {
45 return static_cast<float>(static_cast<int>(value));
46 }
47 int i = static_cast<int>(value);
48 return static_cast<float>(i - (value != static_cast<float>(i) ? 1 : 0));
49}
50
51// Standalone floor implementation for double
52double floor_impl_double(double value) {

Callers 3

fmod_impl_floatFunction · 0.85
floorfFunction · 0.85
floorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected