daily update on 20240315 by nitload youmu
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user