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.Collections.Generic;
|
||||||
using System.Text;
|
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;
|
using System.Text;
|
||||||
|
|
||||||
|
|
||||||
namespace StgSharp
|
namespace StgSharp.Math
|
||||||
{
|
{
|
||||||
public static unsafe partial class Math
|
public static unsafe partial class Calc
|
||||||
{
|
{
|
||||||
|
|
||||||
private const float
|
private const float
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
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)
|
public static unsafe float ATan(float x)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,14 +8,5 @@ namespace StgSharp.Math
|
|||||||
{
|
{
|
||||||
public static unsafe partial class Calc
|
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.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace StgSharp
|
namespace StgSharp.Math
|
||||||
{
|
{
|
||||||
public static partial class Math
|
public static partial class Calc
|
||||||
{
|
{
|
||||||
|
|
||||||
public static float Cos(float x)
|
public static float Cos(float x)
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
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;
|
public const float E = 2.718281828f;
|
||||||
|
|||||||
@@ -2,11 +2,9 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace StgSharp
|
namespace StgSharp.Math
|
||||||
{
|
{
|
||||||
|
public static unsafe partial class calc
|
||||||
|
|
||||||
public static unsafe partial class Math
|
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -4,12 +4,9 @@ using System.Net.Sockets;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using static System.Net.WebRequestMethods;
|
using static System.Net.WebRequestMethods;
|
||||||
|
|
||||||
namespace StgSharp
|
namespace StgSharp.Math
|
||||||
{
|
{
|
||||||
|
public static partial class calc
|
||||||
|
|
||||||
|
|
||||||
public static partial class Math
|
|
||||||
{
|
{
|
||||||
|
|
||||||
static private readonly float[] logArray =
|
static private readonly float[] logArray =
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace StgSharp
|
namespace StgSharp.Math
|
||||||
{
|
{
|
||||||
public static unsafe partial class Math
|
public static unsafe partial class Calc
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// calculate the value of x^y
|
/// calculate the value of x^y
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace StgSharp
|
namespace StgSharp.Math
|
||||||
{
|
{
|
||||||
public static partial class Math
|
public static partial class Calc
|
||||||
{
|
{
|
||||||
private static readonly float[] sinData =
|
private static readonly float[] sinData =
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ using System.Collections.Generic;
|
|||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace StgSharp
|
namespace StgSharp.Math
|
||||||
{
|
{
|
||||||
public static partial class Math
|
public static partial class Calc
|
||||||
{
|
{
|
||||||
/*本方法将小数部分统一提升至2^16处后进行线性近似
|
/*本方法将小数部分统一提升至2^16处后进行线性近似
|
||||||
const uint sqmov = 0b_0100_0111_1000_0000_0000_0000_0000_0000;
|
const uint sqmov = 0b_0100_0111_1000_0000_0000_0000_0000_0000;
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace StgSharp
|
namespace StgSharp.Math
|
||||||
{
|
{
|
||||||
public static partial class Math
|
public static partial class Calc
|
||||||
{
|
{
|
||||||
|
|
||||||
public static float Tan(float x)
|
public static float Tan(float x)
|
||||||
|
|||||||
Reference in New Issue
Block a user