Skip to content

Commit 86aa195

Browse files
committed
Define delegate
1 parent 35c13ab commit 86aa195

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

EasingCore.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
* Licensed under MIT (https://github.com/setchi/EasingCore/blob/master/LICENSE)
55
*/
66

7-
using System;
87
using UnityEngine;
98

109
namespace EasingCore
@@ -44,14 +43,16 @@ public enum Ease
4443
InOutSine,
4544
}
4645

46+
public delegate float EasingFunction(float t);
47+
4748
public static class Easing
4849
{
4950
/// <summary>
5051
/// Gets the easing function
5152
/// </summary>
5253
/// <param name="type">Ease type</param>
5354
/// <returns>Easing function</returns>
54-
public static Func<float, float> Get(Ease type)
55+
public static EasingFunction Get(Ease type)
5556
{
5657
switch (type)
5758
{

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Core Easing Implementation for Unity.
33

44
## API
55
```csharp
6-
public static Func<float, float> Get(Ease type)
6+
public static EasingFunction Get(Ease type)
77
```
88

99
## Usage

0 commit comments

Comments
 (0)