enmergent commit on 20230213 by nitload youmu, recovery of math functions

This commit is contained in:
Nitload
2023-02-13 19:21:59 +08:00
parent d7bee7cab0
commit b3e55ecfc7
17 changed files with 22 additions and 36 deletions
Binary file not shown.
+2 -2
View File
@@ -2,9 +2,9 @@
using System.Collections.Generic;
using System.Text;
namespace StgSharp
namespace StgSharp.Math
{
public static unsafe partial class Math
public static unsafe partial class Calc
{
+2 -2
View File
@@ -9,9 +9,9 @@ using System.Collections.Generic;
using System.Text;
namespace StgSharp
namespace StgSharp.Math
{
public static unsafe partial class Math
public static unsafe partial class Calc
{
private const float
+2 -2
View File
@@ -2,9 +2,9 @@
using System.Collections.Generic;
using System.Text;
namespace StgSharp
namespace StgSharp.Math
{
public static unsafe partial class Math
public static unsafe partial class Calc
{
public static unsafe float ATan(float x)
{
-9
View File
@@ -8,14 +8,5 @@ namespace StgSharp.Math
{
public static unsafe partial class Calc
{
public static unsafe bool Equals<T>(T left,T right)
where T : notnull
{
if (typeof(T) == typeof(float))
{
return left.Equals(right);
}
}
}
}
+2 -2
View File
@@ -2,9 +2,9 @@
using System.Collections.Generic;
using System.Text;
namespace StgSharp
namespace StgSharp.Math
{
public static partial class Math
public static partial class Calc
{
public static float Cos(float x)
+2 -2
View File
@@ -2,9 +2,9 @@
using System.Collections.Generic;
using System.Text;
namespace StgSharp
namespace StgSharp.Math
{
public static unsafe partial class Math
public static unsafe partial class Calc
{
public const float E = 2.718281828f;
+2 -4
View File
@@ -2,11 +2,9 @@
using System.Collections.Generic;
using System.Text;
namespace StgSharp
namespace StgSharp.Math
{
public static unsafe partial class Math
public static unsafe partial class calc
{
/// <summary>
+2 -5
View File
@@ -4,12 +4,9 @@ using System.Net.Sockets;
using System.Text;
using static System.Net.WebRequestMethods;
namespace StgSharp
namespace StgSharp.Math
{
public static partial class Math
public static partial class calc
{
static private readonly float[] logArray =
+2 -2
View File
@@ -2,9 +2,9 @@
using System.Collections.Generic;
using System.Text;
namespace StgSharp
namespace StgSharp.Math
{
public static unsafe partial class Math
public static unsafe partial class Calc
{
/// <summary>
/// calculate the value of x^y
+2 -2
View File
@@ -2,9 +2,9 @@
using System.Collections.Generic;
using System.Text;
namespace StgSharp
namespace StgSharp.Math
{
public static partial class Math
public static partial class Calc
{
private static readonly float[] sinData =
{
+2 -2
View File
@@ -3,9 +3,9 @@ using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Text;
namespace StgSharp
namespace StgSharp.Math
{
public static partial class Math
public static partial class Calc
{
/*本方法将小数部分统一提升至2^16处后进行线性近似
const uint sqmov = 0b_0100_0111_1000_0000_0000_0000_0000_0000;
+2 -2
View File
@@ -2,9 +2,9 @@
using System.Collections.Generic;
using System.Text;
namespace StgSharp
namespace StgSharp.Math
{
public static partial class Math
public static partial class Calc
{
public static float Tan(float x)