using System; using System.Collections; using System.Collections.Generic; using UnityEngine; namespace XericLibrary.Runtime.MacroLibrary { /// /// 缓动步进库 /// public static class MacroInching { /// /// 线性步进 /// /// public static double LinearTowards(double from, double to, double maxStepDelta) { return from + Math.Clamp(to - from, -maxStepDelta, maxStepDelta); } /// /// 线性步进 /// /// public static float LinearTowards(float from, float to, float maxStepDelta) { return (float)LinearTowards((double)from, (double)to, (double)maxStepDelta); } } }