Added Math min/max for float

This commit is contained in:
Simon Lübeß
2023-06-28 22:03:43 +02:00
parent b31d43820a
commit e12fcaacff
+10
View File
@@ -316,6 +316,11 @@ static
#endregion #endregion
#region min / max #region min / max
public static float min(float x, float y)
{
return Math.Min(x, y);
}
public static float2 min(float2 x, float2 y) public static float2 min(float2 x, float2 y)
{ {
@@ -331,6 +336,11 @@ static
{ {
return float4(Math.Min(x.X, y.X), Math.Min(x.Y, y.Y), Math.Min(x.Z, y.Z), Math.Min(x.W, y.W)); return float4(Math.Min(x.X, y.X), Math.Min(x.Y, y.Y), Math.Min(x.Z, y.Z), Math.Min(x.W, y.W));
} }
public static float max(float x, float y)
{
return Math.Max(x, y);
}
public static float2 max(float2 x, float2 y) public static float2 max(float2 x, float2 y)
{ {