mirror of
https://github.com/esphome/esphome.git
synced 2025-09-12 16:22:22 +01:00
Introduce clamp as a template function (#1953)
This commit is contained in:
@@ -80,7 +80,7 @@ class HighFrequencyLoopRequester {
|
||||
* @param max The maximum value.
|
||||
* @return val clamped in between min and max.
|
||||
*/
|
||||
float clamp(float val, float min, float max);
|
||||
template<typename T> T clamp(T val, T min, T max);
|
||||
|
||||
/** Linearly interpolate between end start and end by completion.
|
||||
*
|
||||
|
Reference in New Issue
Block a user