mirror of
https://github.com/oliverbooth/X10D
synced 2024-11-10 03:05:42 +00:00
Aggressively inline LerpInternal
This commit is contained in:
parent
f6b885b46b
commit
8976993cee
@ -135,12 +135,12 @@ namespace X10D.DoubleExtensions
|
||||
return Math.Round(value / nearest) * nearest;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
private static double LerpInternal(double a, double b, double t)
|
||||
{
|
||||
// rookie mistake: a + t * (b - a)
|
||||
|
||||
// "precise" method: (1 - t) * a + t * b
|
||||
return (1 - t) * a + t * b;
|
||||
return (1.0 - t) * a + t * b;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user