daily update on 20240514 by nitload youmu

This commit is contained in:
YoumuLiu
2024-05-14 15:41:22 +08:00
parent a3506c96a3
commit 2e57126ab7
75 changed files with 3572 additions and 198 deletions
+12
View File
@@ -54,10 +54,18 @@ namespace StgSharp.Data
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public T Read<T>(int index) where T : struct
#if NET8_0_OR_GREATER
, INumber
#else
, IConvertible
#endif
{
fixed (Vector4* p = &vec)
{
#pragma warning disable CS8500
return *(((T*)p) + index);
#pragma warning restore CS8500
}
}
@@ -80,11 +88,15 @@ namespace StgSharp.Data
public void Write<T>(int index, T value) where T : struct
#if NET8_0_OR_GREATER
, INumber
#else
,IConvertible
#endif
{
fixed (Vector4* p = &vec)
{
#pragma warning disable CS8500
*(((T*)p) + index) = value;
#pragma warning restore CS8500
}
}