enmergent commit on 20230213 by nitload youmu, recovery of math functions
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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
|
||||
{
|
||||
|
||||
|
||||
|
||||
@@ -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,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)
|
||||
{
|
||||
|
||||
@@ -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,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,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,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>
|
||||
|
||||
@@ -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,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,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 =
|
||||
{
|
||||
|
||||
@@ -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,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)
|
||||
|
||||
Reference in New Issue
Block a user