fishbait/UnityProject/Assets/FishNet/Runtime/Serializing/Helping/ValueConversions.cs
NIMFER bf403a8f97 Ducktaped together a FishNet version of the Transport
Ducktaped together a FishNet version of the Transport, now I need to edit the LoadBalancer and Server so it connects and actually trades information
2022-08-14 03:55:25 +02:00

41 lines
813 B
C#

using System.Runtime.InteropServices;
namespace FishNet.Serializing.Helping
{
// -- helpers for float conversion without allocations --
[StructLayout(LayoutKind.Explicit)]
internal struct UIntFloat
{
[FieldOffset(0)]
public float FloatValue;
[FieldOffset(0)]
public uint UIntValue;
}
[StructLayout(LayoutKind.Explicit)]
internal struct UIntDouble
{
[FieldOffset(0)]
public double DoubleValue;
[FieldOffset(0)]
public ulong LongValue;
}
[StructLayout(LayoutKind.Explicit)]
internal struct UIntDecimal
{
[FieldOffset(0)]
public ulong LongValue1;
[FieldOffset(8)]
public ulong LongValue2;
[FieldOffset(0)]
public decimal DecimalValue;
}
}