daily update on 20230301 by nitload youmu, file struct cahnged and more vec func added

This commit is contained in:
Nitload
2023-03-02 01:30:46 +08:00
parent d09105c9c1
commit bb71567e51
594 changed files with 368 additions and 2601 deletions
+28
View File
@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace StgSharp.Math
{
public static partial class Calc
{
public static float Tan(float x)
{
float refer = x / 360.0f;
refer -= (int)refer;
refer *= 40;
int a = (int)refer; //大分度,查表
refer -= a; //小分度,拟合
float refer2 = refer * refer;
float sin = (0.1570796327f * refer - 6.459640975e-4f * refer * refer2);
float cos = (1 - 0.0123370055f * refer2 + 2.536695709e-5f * refer2 * refer2);
return ( sinData[a] * cos + cosData[a] * sin )
/ ( cosData[a] * cos - sinData[a] * sin );
}
}
}