MPD  0.20.18
Functions
Clamp.hxx File Reference
#include "Compiler.h"
Include dependency graph for Clamp.hxx:

Go to the source code of this file.

Functions

template<typename T >
static constexpr const T & Clamp (const T &value, const T &min, const T &max)
 Clamps the specified value in a range. More...
 

Function Documentation

◆ Clamp()

template<typename T >
static constexpr const T& Clamp ( const T &  value,
const T &  min,
const T &  max 
)
inlinestatic

Clamps the specified value in a range.

Returns #min or #max if the value is outside.

Definition at line 41 of file Clamp.hxx.