Removed Vector2.tofactor

This commit is contained in:
Pascal Serrarens 2024-03-14 12:06:07 +01:00
parent 159bdaec8e
commit dc601a1746
3 changed files with 201 additions and 209 deletions

View File

@ -140,7 +140,3 @@ Vector2 Vector2::Lerp(Vector2 from, Vector2 to, float f) {
Vector2 v = from + (to - from) * f;
return v;
}
float Vector2::ToFactor(Vector2 a, Vector2 b) {
return (1 - Vector2::Dot(a, b)) / 2;
}

View File

@ -229,8 +229,6 @@ public:
/// matches the *to* vector Value -1 is *from* vector minus the difference
/// between *from* and *to* etc.
static Vector2 Lerp(Vector2 from, Vector2 to, float f);
static float ToFactor(Vector2 a, Vector2 b);
};
#endif

View File

@ -460,6 +460,4 @@ TEST(Vector2, Lerp) {
EXPECT_FLOAT_EQ(Vector2::Distance(r, Vector2(-2.0, -1.0f)), 0);
}
TEST(Vector2, DISABLED_ToFactor) {}
#endif