Add Spline

This commit is contained in:
Wojtek Figat
2021-01-25 10:41:53 +01:00
parent 6cbeac6537
commit fe78fa7575
16 changed files with 914 additions and 2 deletions

View File

@@ -506,6 +506,14 @@ inline Color operator*(float a, const Color& b)
return b * a;
}
namespace Math
{
FORCE_INLINE static bool NearEqual(const Color& a, const Color& b)
{
return Color::NearEqual(a, b);
}
}
template<>
struct TIsPODType<Color>
{

View File

@@ -231,6 +231,14 @@ inline Color32 operator*(float a, const Color32& b)
return b * a;
}
namespace Math
{
FORCE_INLINE static bool NearEqual(const Color32& a, const Color32& b)
{
return a == b;
}
}
template<>
struct TIsPODType<Color32>
{

View File

@@ -293,6 +293,14 @@ public:
static void Lerp(const Transform& t1, const Transform& t2, float amount, Transform& result);
};
namespace Math
{
FORCE_INLINE static bool NearEqual(const Transform& a, const Transform& b)
{
return Transform::NearEqual(a, b);
}
}
template<>
struct TIsPODType<Transform>
{

View File

@@ -379,7 +379,7 @@ public:
static bool NearEqual(const Vector4& a, const Vector4& b)
{
return Math::NearEqual(a.X, b.X) && Math::NearEqual(a.Y, b.Y) & Math::NearEqual(a.Z, b.Z) && Math::NearEqual(a.W, b.W);
return Math::NearEqual(a.X, b.X) && Math::NearEqual(a.Y, b.Y) && Math::NearEqual(a.Z, b.Z) && Math::NearEqual(a.W, b.W);
}
static bool NearEqual(const Vector4& a, const Vector4& b, float epsilon)