FastLED 3.9.15
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages

◆ setLoadFactor()

template<typename Key, typename T, typename Hash = Hash<Key>, typename KeyEqual = EqualTo<Key>, int INLINED_COUNT = FASTLED_HASHMAP_INLINED_COUNT>
void fl::HashMap< Key, T, Hash, KeyEqual, INLINED_COUNT >::setLoadFactor ( float f)
inline

Definition at line 59 of file hash_map.h.

59 {
60 f = fl::clamp(f, 0.f, 1.f);
61 mLoadFactor = fl::map_range<float, uint8_t>(f, 0.f, 1.f, 0, 255);
62 }
uint8_t mLoadFactor
Definition hash_map.h:579
FASTLED_FORCE_INLINE T clamp(T value, T min, T max)
Definition clamp.h:10
FASTLED_FORCE_INLINE U map_range(T value, T in_min, T in_max, U out_min, U out_max)
Definition map_range.h:26

Referenced by fl::HashMap< Key, T, Hash, KeyEqual >::HashMap().

+ Here is the caller graph for this function: