mirror of
https://github.com/RawAccelOfficial/rawaccel.git
synced 2025-05-11 18:36:46 +02:00
inline lerp
This commit is contained in:
parent
330f2f4c2a
commit
e1397f3edb
2 changed files with 10 additions and 9 deletions
|
@ -35,15 +35,6 @@ namespace rawaccel {
|
|||
return (v < lo) ? lo : (hi < v) ? hi : v;
|
||||
}
|
||||
|
||||
constexpr double lerp(double a, double b, double t)
|
||||
{
|
||||
double x = a + t * (b - a);
|
||||
if ((t > 1) == (a < b)) {
|
||||
return maxsd(x, b);
|
||||
}
|
||||
return minsd(x, b);
|
||||
}
|
||||
|
||||
// returns the unbiased exponent of x if x is normal
|
||||
inline int ilogb(double x)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue