Daily update on 20230505 by nitload youmu, confuse on OpenGL

This commit is contained in:
Nitload
2023-05-05 02:42:16 +08:00
parent 4dd3f4f6d1
commit 6da268056c
99 changed files with 58766 additions and 8132 deletions
+1 -14
View File
@@ -6,7 +6,6 @@ namespace StgSharp.Math
{
public static partial class Calc
{
private static m128 sqrtCache;
public static unsafe float Sqrt(float x)
{
@@ -21,7 +20,7 @@ namespace StgSharp.Math
if (x < 0)
{
throw new ArgumentOutOfRangeException();
throw new ArgumentOutOfRangeException("Input is smaller than zero!");
}
if (x == 0)
{
@@ -71,18 +70,6 @@ namespace StgSharp.Math
float result = *(float*)&e;
result = (result + x / result) / 2;
return (result + x / result) / 2;
/**/
/*
fixed (m128* p = &sqrtCache)
{
sqrtCache.float0 = x;
return (SSE.Sqrtss(p)).float0;
}
*/
}
[DllImport("xmmintrin.h",EntryPoint = "_mm_sqrt_ss")]
public static extern m128 Sqrtss(m128 a);
}
}