Added Min/Max to Vectors

This commit is contained in:
Simon Lübeß
2021-10-30 11:24:58 +02:00
parent ffafa380ea
commit b3f9376dc8
3 changed files with 32 additions and 2 deletions
+10
View File
@@ -193,6 +193,16 @@ namespace GlitchyEngine.Math
{
return a + interpolationValue * (b - a);
}
public static Vector3 Min(Vector3 a, Vector3 b)
{
return .(Math.Min(a.X, b.X), Math.Min(a.Y, b.Y), Math.Min(a.Z, b.Z));
}
public static Vector3 Max(Vector3 a, Vector3 b)
{
return .(Math.Max(a.X, b.X), Math.Max(a.Y, b.Y), Math.Min(a.Z, b.Z));
}
//
// Assignment operators