26 template<
typename VectorType,
typename Predicate>
27 static typename std::vector<VectorType>::iterator
RemoveIfErase(std::vector<VectorType>& _vec,
const Predicate& _predicate)
29 auto it = std::remove_if(_vec.begin(), _vec.end(), _predicate);
31 return _vec.erase(it, _vec.end());
44 static bool EpsilonIf(T _val01, T _val02, T _epsilon)
46 return ((abs(_val01 - _val02)) <= _epsilon);
59 static bool IsRange(T _val, T _rangeMin, T _rangeMax)
61 return ((_val >= _rangeMin) && (_val <= _rangeMax));
Definition Accessor.hpp:110
static bool IsRange(T _val, T _rangeMin, T _rangeMax)
valが範囲内か調べる
Definition utility.hpp:59
static std::vector< VectorType >::iterator RemoveIfErase(std::vector< VectorType > &_vec, const Predicate &_predicate)
std::vector<T>から特定の条件に一致する要素を削除する関数 RemoveIfした後にEraseするため、高速です
Definition utility.hpp:27
static bool EpsilonIf(T _val01, T _val02, T _epsilon)
_valの差が_許容範囲内か調べる
Definition utility.hpp:44