Console Library 8.0.0
A header-only library that makes C++ simple
Loading...
Searching...
No Matches
console::ops::Clamp< T > Struct Template Reference

限幅变换器。 More...

#include <gextra.h>

Public Member Functions

T operator() (T x) const
 将输入值限制在 [low, high] 范围内。

Public Attributes

T low
T high

Detailed Description

template<class T>
struct console::ops::Clamp< T >

限幅变换器。

Template Parameters
T元素类型。

Member Function Documentation

◆ operator()()

template<class T>
T console::ops::Clamp< T >::operator() ( T x) const
inline

将输入值限制在 [low, high] 范围内。

Parameters
x输入值。
Returns
限幅后的值。

Member Data Documentation

◆ high

template<class T>
T console::ops::Clamp< T >::high

◆ low

template<class T>
T console::ops::Clamp< T >::low

The documentation for this struct was generated from the following file: