添加一些单例系统,材质方法

This commit is contained in:
2023-10-24 08:44:11 +08:00
parent a024cf600b
commit 498e56bb69
36 changed files with 16499 additions and 384 deletions
+16
View File
@@ -4,6 +4,7 @@ using System.Collections.Generic;
using System.Runtime.CompilerServices;
using UnityEngine;
using UnityEngine.Windows;
namespace XericLibrary.Runtime.MacroLibrary
{
@@ -50,6 +51,21 @@ namespace XericLibrary.Runtime.MacroLibrary
#region 数学
/// <summary>
/// pmod
/// </summary>
/// <param name="a"></param>
/// <param name="b"></param>
/// <returns></returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static int PMod(int a, int b)
{
if(b <= 0)
return 0;
var mod = a % b;
return a < 0 ? (b + mod) % b : mod;
}
/// <summary>
/// pmod
/// </summary>