OpenSiv3D  v0.6.5
C++20 framework for creative coding
Utility.hpp File Reference
#include <algorithm>
#include <type_traits>
#include "Common.hpp"
#include "Concepts.hpp"
#include "detail/Utility_detail.ipp"
#include "detail/Utility.ipp"

Namespaces

 s3d
 

Functions

constexpr SIV3D_CONCEPT_SCALAR Scalar s3d::Max (Scalar a, Scalar b) noexcept
 2 つの値のうち大きい方の値を返します。 | Returns the greater of the two. More...
 
constexpr const SIV3D_CONCEPT_NONSCALAR NonScalar & s3d::Max (const NonScalar &a, const NonScalar &b) noexcept(noexcept(a< b))
 2 つの値のうち大きい方の値を返します。 | Returns the greater of the two. More...
 
template<class Type >
constexpr Type s3d::Max (std::initializer_list< Type > ilist)
 渡された初期化リストの中で最大の値を返します。 | Returns the greatest of the values in initializer list. More...
 
constexpr SIV3D_CONCEPT_SCALAR Scalar s3d::Min (Scalar a, Scalar b) noexcept
 2 つの値のうち小さい方の値を返します。 | Returns the lesser of the two. More...
 
constexpr const SIV3D_CONCEPT_NONSCALAR NonScalar & s3d::Min (const NonScalar &a, const NonScalar &b) noexcept(noexcept(b< a))
 2 つの値のうち小さい方の値を返します。 | Returns the lesser of the two. More...
 
template<class Type >
constexpr Type s3d::Min (std::initializer_list< Type > ilist)
 渡された初期化リストの中で最小の値を返します。 | Returns the least of the values in initializer list. More...
 
constexpr SIV3D_CONCEPT_SCALAR Scalar s3d::Clamp (Scalar v, Scalar min, Scalar max) noexcept
 最小値と最大値の範囲にクランプした値を返します。 | Clamps the value to the specified minimum and maximum range. More...
 
constexpr const SIV3D_CONCEPT_NONSCALAR NonScalar & s3d::Clamp (const NonScalar &v, const NonScalar &min, const NonScalar &max) noexcept(noexcept(max< v) &&noexcept(v< min))
 最小値と最大値の範囲にクランプした値を返します。 | Clamps the value to the specified minimum and maximum range. More...
 
constexpr SIV3D_CONCEPT_SCALAR bool s3d::InRange (Scalar v, Scalar min, Scalar max) noexcept
 値が閉区間 [min, max] にあるかを返します。 | Returns true if the value is in the closed interval [min, max]. More...
 
constexpr SIV3D_CONCEPT_NONSCALAR bool s3d::InRange (const NonScalar &v, const NonScalar &min, const NonScalar &max) noexcept(noexcept(v< min))
 値が閉区間 [min, max] にあるかを返します。 | Returns true if the value is in the closed interval [min, max]. More...
 
constexpr SIV3D_CONCEPT_SCALAR bool s3d::InOpenRange (Scalar v, Scalar min, Scalar max) noexcept
 値が開区間 (min, max) にあるかを返します。 | Returns true if the value is in the open interval (min, max). More...
 
constexpr SIV3D_CONCEPT_NONSCALAR bool s3d::InOpenRange (const NonScalar &v, const NonScalar &min, const NonScalar &max) noexcept(noexcept(v< min))
 値が開区間 (min, max) にあるかを返します。 | Returns true if the value is in the open interval (min, max). More...
 
constexpr SIV3D_CONCEPT_ARITHMETIC auto s3d::AbsDiff (Arithmetic a, Arithmetic b) noexcept
 差の絶対値を返します。 More...
 
template<class Container , class Pred >
void s3d::Erase_if (Container &c, Pred pred)
 コンテナから条件を満たす要素を削除します。 More...
 
template<class Container , class Pred >
void s3d::EraseNodes_if (Container &c, Pred pred)
 コンテナから条件を満たす要素を削除します。 More...
 
template<class T , class U >
constexpr bool s3d::CmpEqual (T lhs, U rhs) noexcept
 
template<class T , class U >
constexpr bool s3d::CmpNotEqual (T lhs, U rhs) noexcept
 
template<class T , class U >
constexpr bool s3d::CmpLess (T lhs, U rhs) noexcept
 

Variables

constexpr auto s3d::Abs = detail::Abs_impl{}
 絶対値を計算する関数オブジェクトです。 More...
 
constexpr auto s3d::FromEnum = detail::FromEnum_impl{}
 列挙型を整数型に変換する関数オブジェクトです。 More...
 
constexpr SIV3D_CONCEPT_ENUM auto s3d::ToEnum = detail::ToEnum_impl<Enum>{}
 整数を列挙型の値に変換する関数オブジェクトです。 More...
 
constexpr auto s3d::IsOdd = detail::IsOdd_impl{}
 数が奇数かを判定する関数オブジェクトです。 More...
 
constexpr auto s3d::IsEven = detail::IsEven_impl{}
 数が偶数かを判定する関数オブジェクトです。 More...
 
constexpr auto s3d::Identity = detail::Identity_impl{}
 渡された値をそのまま返す関数オブジェクトです。 More...