FastLED 3.10.8
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 198 of file rgbw_colorimetric.h.

199 {
200 if (cool_cct == warm_cct) return 0.5f;
201 const float t = (static_cast<float>(target_cct) - warm_cct)
202 / (static_cast<float>(cool_cct) - warm_cct);
203 return fl::clamp(t, 0.0f, 1.0f);
204}
constexpr enable_if< is_fixed_point< T >::value, T >::type clamp(T x, T lo, T hi) FL_NO_EXCEPT

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

+ Here is the call graph for this function: