1
0
mirror of https://github.com/Cardidi/dotween-upm-fork.git synced 2025-12-21 01:36:05 +08:00
2015-03-18 19:30:48 +01:00

21 lines
493 B
C#

using System;
using UnityEngine;
public static class GoEaseSinusoidal
{
public static float EaseIn( float t, float b, float c, float d )
{
return -c * (float)Math.Cos( t / d * ( Math.PI / 2 ) ) + c + b;
}
public static float EaseOut( float t, float b, float c, float d )
{
return c * (float)Math.Sin( t / d * ( Math.PI / 2 ) ) + b;
}
public static float EaseInOut( float t, float b, float c, float d )
{
return -c / 2 * ( (float)Math.Cos( Math.PI * t / d ) - 1 ) + b;
}
}