Archived
添加了一些用于名称切换数据,可以满足随机名称的要求
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XericLibrary.Runtime.MacroLibrary
|
||||
{
|
||||
/// <summary>
|
||||
/// 缓动步进库
|
||||
/// </summary>
|
||||
public static class MacroInching
|
||||
{
|
||||
/// <summary>
|
||||
/// 线性步进
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static double LinearTowards(double from, double to, double maxStepDelta)
|
||||
{
|
||||
return from + Math.Clamp(to - from, -maxStepDelta, maxStepDelta);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 线性步进
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static float LinearTowards(float from, float to, float maxStepDelta)
|
||||
{
|
||||
return (float)LinearTowards((double)from, (double)to, (double)maxStepDelta);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user