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

Function calculateCorkscrewWidth

src/fl/gfx/corkscrew.h:51–53  ·  view source on GitHub ↗

Simple constexpr functions for compile-time corkscrew dimension calculation

Source from the content-addressed store, hash-verified

49
50// Simple constexpr functions for compile-time corkscrew dimension calculation
51constexpr fl::u16 calculateCorkscrewWidth(float totalTurns, fl::u16 numLeds) {
52 return static_cast<fl::u16>(ceil_constexpr(static_cast<float>(numLeds) / totalTurns));
53}
54
55constexpr fl::u16 calculateCorkscrewHeight(float totalTurns, fl::u16 numLeds) {
56 return (calculateCorkscrewWidth(totalTurns, numLeds) * static_cast<int>(ceil_constexpr(totalTurns)) > numLeds) ?

Callers 3

calculateCorkscrewHeightFunction · 0.85
FL_TEST_FILEFunction · 0.85
curr.hFile · 0.85

Calls 1

ceil_constexprFunction · 0.85

Tested by

no test coverage detected