ScriptCore: atan2

This commit is contained in:
Simon Lübeß
2023-09-05 23:15:48 +02:00
parent 7bffd01401
commit 5af174ecee
+20
View File
@@ -838,4 +838,24 @@ public static class Math
// transpose und determinante für Matrizen // transpose und determinante für Matrizen
// sin, cos, tan, asin, acos, atan, atan2, cosh, sinh, tanh // sin, cos, tan, asin, acos, atan, atan2, cosh, sinh, tanh
public static float atan2(float y, float x)
{
return (float)System.Math.Atan2(y, x);
}
public static float2 atan2(float2 y, float2 x)
{
return new float2((float)System.Math.Atan2(y.X, x.X), (float)System.Math.Atan2(y.Y, x.Y));
}
public static float3 atan2(float3 y, float3 x)
{
return new float3((float)System.Math.Atan2(y.X, x.X), (float)System.Math.Atan2(y.Y, x.Y), (float)System.Math.Atan2(y.Z, x.Z));
}
public static float4 atan2(float4 y, float4 x)
{
return new float4((float)System.Math.Atan2(y.X, x.X), (float)System.Math.Atan2(y.Y, x.Y), (float)System.Math.Atan2(y.Z, x.Z), (float)System.Math.Atan2(y.W, x.W));
}
} }