arcsin(x) added

This commit is contained in:
Nitload
2023-01-26 01:45:38 +08:00
parent 05869ac0ae
commit f75fcacc0d
36 changed files with 212 additions and 12 deletions
+44
View File
@@ -0,0 +1,44 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Runtime.InteropServices;
using System.Text;
namespace StgSharp
{
//对4字节空间的联合体的C#实现
[StructLayout(LayoutKind.Explicit, Size = 4)]
public struct Union4
{
[FieldOffset(0)]
public byte b0;
[FieldOffset(1)]
public byte b1;
[FieldOffset(2)]
public byte b2;
[FieldOffset(3)]
public byte b3;
//得到对应的int值
[FieldOffset(0)]
public uint i;
//得到对应的float值
[FieldOffset(0)]
public float f;
public Union4(float x, uint y)
{
b0 = 0;
b1 = 0;
b2 = 0;
b3 = 0;
i = 0;
f = x;
y = i;
}
}
}