FastLED 3.9.15
Loading...
Searching...
No Matches

◆ rgbcct_eta_for_cct()

float fl::colorimetric_detail::rgbcct_eta_for_cct ( int target_cct,
int warm_cct,
int cool_cct )
inline

Definition at line 354 of file rgbw_colorimetric.h.

355 {
356 if (cool_cct == warm_cct) return 0.5f;
357 const float t = (static_cast<float>(target_cct) - warm_cct)
358 / (static_cast<float>(cool_cct) - warm_cct);
359 return fl::clamp(t, 0.0f, 1.0f);
360}
constexpr enable_if< is_fixed_point< T >::value, T >::type clamp(T x, T lo, T hi) FL_NOEXCEPT

References fl::clamp(), FL_NOEXCEPT, and fl::t.

+ Here is the call graph for this function: