mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
Added Math min/max for float
This commit is contained in:
@@ -317,6 +317,11 @@ static
|
|||||||
|
|
||||||
#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)
|
||||||
{
|
{
|
||||||
return float2(Math.Min(x.X, y.X), Math.Min(x.Y, y.Y));
|
return float2(Math.Min(x.X, y.X), Math.Min(x.Y, y.Y));
|
||||||
@@ -332,6 +337,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)
|
||||||
{
|
{
|
||||||
return float2(Math.Max(x.X, y.X), Math.Max(x.Y, y.Y));
|
return float2(Math.Max(x.X, y.X), Math.Max(x.Y, y.Y));
|
||||||
|
|||||||
Reference in New Issue
Block a user