daily update on 20240403 by nitload youmu

This commit is contained in:
YoumuLiu
2024-04-03 08:56:33 +08:00
parent b207f16616
commit 127fcdbfd3
631 changed files with 23499 additions and 2664 deletions
+39
View File
@@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.Math
{
public static unsafe partial class Scaler
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe int SignOf(float x)
{
if (x == 0)
{
return 0;
}
if (x>0)
{
return 1;
}
return -1;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe int SignOf(int x)
{
if (x == 0)
{
return 0;
}
if (x > 0)
{
return 1;
}
return -1;
}
}
}