daily update on 20240315 by nitload youmu

This commit is contained in:
YoumuLiu
2024-03-16 03:09:00 +08:00
parent a770bbe685
commit 15bf989285
84 changed files with 1064 additions and 1981 deletions
+4 -3
View File
@@ -1,11 +1,12 @@
using System;
using System.Globalization;
using System.Runtime.CompilerServices;
namespace StgSharp.Math
{
public static unsafe partial class Scaler
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe float Abs(float x)
{
uint* a = (uint*)&x;
@@ -13,6 +14,7 @@ namespace StgSharp.Math
return *(float*)a;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe int Abs(int x)
{
uint* a = (uint*)&x;
@@ -34,6 +36,5 @@ namespace StgSharp.Math
return CultureInfo.CurrentCulture.TextInfo.ListSeparator;
}
}
}
}