MGL(Win32)
読み取り中…
検索中…
一致する文字列を見つけられません
MGL::Range< T > クラステンプレート

値の範囲を表現するクラス [詳解]

#include <mgl_range.h>

公開メンバ関数

constexpr Range () noexcept=default
 コンストラクタ
 
constexpr Range (T begin, T end) noexcept
 コンストラクタ
 
constexpr T Begin () const noexcept
 開始値を取得
 
constexpr T End () const noexcept
 終了値を取得
 
constexpr bool IsPositive () const noexcept
 値が正の方向に進むかを取得
 
constexpr bool IsNegative () const noexcept
 値が負の方向に進むかを取得
 
constexpr bool IsSingleValue () const noexcept
 値が範囲を持たない単一の値であるかを取得
 
constexpr bool IsZero () const noexcept
 範囲がゼロであるかを取得
 
constexpr T Next (T value) const noexcept
 指定された値の次の値を取得
 
constexpr T Previous (T value) const noexcept
 指定された値の前の値を取得
 
constexpr bool Contains (T value) const noexcept
 指定された値が範囲内に含まれているかを取得
 
constexpr T Clamp (T value) const noexcept
 指定した値を範囲内にクランプ
 
constexpr float Normalize (T value) const noexcept
 値を0.0fから1.0fの値に正規化
 
constexpr T Scale (float normalizedValue) const noexcept
 正規化された値からスケーリング
 

詳解

template<class T>
class MGL::Range< T >

値の範囲を表現するクラス

テンプレート引数
T扱う値の型

構築子と解体子

◆ Range()

template<class T >
MGL::Range< T >::Range ( T begin,
T end )
inlineconstexprnoexcept

コンストラクタ

引数
[in]begin開始値
[in]end終了値

関数詳解

◆ Begin()

template<class T >
T MGL::Range< T >::Begin ( ) const
inlinenodiscardconstexprnoexcept

開始値を取得

戻り値
開始値

◆ Clamp()

template<class T >
T MGL::Range< T >::Clamp ( T value) const
inlinenodiscardconstexprnoexcept

指定した値を範囲内にクランプ

引数
[in]value指定値
戻り値
クランプされた値

◆ Contains()

template<class T >
bool MGL::Range< T >::Contains ( T value) const
inlinenodiscardconstexprnoexcept

指定された値が範囲内に含まれているかを取得

引数
[in]value指定値
戻り値
true含まれている
false含まれていない

◆ End()

template<class T >
T MGL::Range< T >::End ( ) const
inlinenodiscardconstexprnoexcept

終了値を取得

戻り値
終了値

◆ IsNegative()

template<class T >
bool MGL::Range< T >::IsNegative ( ) const
inlinenodiscardconstexprnoexcept

値が負の方向に進むかを取得

戻り値
true値は負の方向に進む
false値は正の方向に進む

◆ IsPositive()

template<class T >
bool MGL::Range< T >::IsPositive ( ) const
inlinenodiscardconstexprnoexcept

値が正の方向に進むかを取得

戻り値
true値は正の方向に進む
false値は負の方向に進む

◆ IsSingleValue()

template<class T >
bool MGL::Range< T >::IsSingleValue ( ) const
inlinenodiscardconstexprnoexcept

値が範囲を持たない単一の値であるかを取得

戻り値
true値は範囲を持たない
false値は範囲を持つ

◆ IsZero()

template<class T >
bool MGL::Range< T >::IsZero ( ) const
inlinenodiscardconstexprnoexcept

範囲がゼロであるかを取得

戻り値
true範囲がゼロ
false範囲がゼロではない

◆ Next()

template<class T >
T MGL::Range< T >::Next ( T value) const
inlinenodiscardconstexprnoexcept

指定された値の次の値を取得

引数
[in]value現在の値
戻り値
valueの次の値

◆ Normalize()

template<class T >
float MGL::Range< T >::Normalize ( T value) const
inlinenodiscardconstexprnoexcept

値を0.0fから1.0fの値に正規化

引数
[in]value正規化する値
戻り値
正規化された値

◆ Previous()

template<class T >
T MGL::Range< T >::Previous ( T value) const
inlinenodiscardconstexprnoexcept

指定された値の前の値を取得

引数
[in]value現在の値
戻り値
valueの前の値

◆ Scale()

template<class T >
T MGL::Range< T >::Scale ( float normalizedValue) const
inlinenodiscardconstexprnoexcept

正規化された値からスケーリング

引数
[in]normalizedValue正規化された値
戻り値
スケーリングされた値

このクラス詳解は次のファイルから抽出されました: