add linear interpolation function
This commit is contained in:
parent
b8e9ea816d
commit
d4cc9853cf
@ -84,6 +84,11 @@ void init(uint32_t prec)
|
||||
// mpfr::mpreal::set_default_prec(prec);
|
||||
}
|
||||
|
||||
double Util::linear_interpolate(double v0, double v1, float t)
|
||||
{
|
||||
return (1 - t) * v0 + t * v1;
|
||||
}
|
||||
|
||||
Vec2mp::Vec2mp(mpfr::mpreal x, mpfr::mpreal y)
|
||||
: x(x), y(y)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user