Add Mod for vectors

This commit is contained in:
Wojtek Figat
2022-07-31 19:05:36 +02:00
parent 3b52914416
commit 17b3434342
4 changed files with 20 additions and 0 deletions

View File

@@ -512,6 +512,11 @@ public:
return Vector3Base(a.X > b.X ? a.X : b.X, a.Y > b.Y ? a.Y : b.Y, a.Z > b.Z ? a.Z : b.Z);
}
static Vector3Base Mod(const Vector3Base& a, const Vector3Base& b)
{
return Vector3Base(Math::Mod(a.X, b.X), Math::Mod(a.Y, b.Y), Math::Mod(a.Z, b.Z));
}
static Vector3Base Floor(const Vector3Base& v)
{
return Vector3Base(Math::Floor(v.X), Math::Floor(v.Y), Math::Floor(v.Z));