-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathIValueOperationsT.cs
More file actions
33 lines (30 loc) · 956 Bytes
/
IValueOperationsT.cs
File metadata and controls
33 lines (30 loc) · 956 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using System;
namespace BrainbeanApps.ValueAnimation
{
/// <summary>
/// Defines math operations used by animator.
/// </summary>
public interface IValueOperations<T>
where T : struct, IComparable
{
/// <summary>
/// Add the specified l and r.
/// </summary>
/// <param name="l">Left operand.</param>
/// <param name="r">Right operand.</param>
T Add(T l, T r);
/// <summary>
/// Subtract the specified l and r.
/// </summary>
/// <param name="l">Left operand.</param>
/// <param name="r">Right operand.</param>
T Subtract(T l, T r);
/// <summary>
/// Scales the specified value by factor.
/// </summary>
/// <returns>The by single.</returns>
/// <param name="value">Value.</param>
/// <param name="factor">Factor.</param>
T ScaleByFactor(T value, float factor);
}
}