Math/VectorI: Add Apply static method
This commit is contained in:
committed by
Jérôme Leclercq
parent
addbb98671
commit
c826b537ab
@@ -600,6 +600,12 @@ namespace Nz
|
||||
return y >= vec.y;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
constexpr Vector2<T> Vector2<T>::Apply(T(*func)(T), const Vector2& vec)
|
||||
{
|
||||
return Vector2(func(vec.x), func(vec.y));
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
constexpr bool Vector2<T>::ApproxEqual(const Vector2& lhs, const Vector2& rhs, T maxDifference)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user