mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
syntax
This commit is contained in:
parent
827a6d310c
commit
dea63ba59e
@ -5,11 +5,6 @@ namespace Mirror
|
|||||||
{
|
{
|
||||||
public static class Mathd
|
public static class Mathd
|
||||||
{
|
{
|
||||||
/// <summary>Linearly interpolates between a and b by t with no limit to t.</summary>
|
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
||||||
public static double LerpUnclamped(double a, double b, double t) =>
|
|
||||||
a + (b - a) * t;
|
|
||||||
|
|
||||||
/// <summary>Clamps value between 0 and 1 and returns value.</summary>
|
/// <summary>Clamps value between 0 and 1 and returns value.</summary>
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public static double Clamp01(double value)
|
public static double Clamp01(double value)
|
||||||
@ -23,5 +18,10 @@ public static double Clamp01(double value)
|
|||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public static double InverseLerp(double a, double b, double value) =>
|
public static double InverseLerp(double a, double b, double value) =>
|
||||||
a != b ? Clamp01((value - a) / (b - a)) : 0;
|
a != b ? Clamp01((value - a) / (b - a)) : 0;
|
||||||
|
|
||||||
|
/// <summary>Linearly interpolates between a and b by t with no limit to t.</summary>
|
||||||
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
|
public static double LerpUnclamped(double a, double b, double t) =>
|
||||||
|
a + (b - a) * t;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user