chased down more math vs mathx usage (and actually fixed the random_lerp usage)

This commit is contained in:
Max Cahill 2021-11-19 15:35:52 +11:00
parent 4460a94933
commit 7767802433

View File

@ -71,8 +71,8 @@ end
--bilinear interpolation between 4 samples --bilinear interpolation between 4 samples
function mathx.bilerp(a, b, c, d, u, v) function mathx.bilerp(a, b, c, d, u, v)
return mathx.lerp( return mathx.lerp(
math.lerp(a, b, u), mathx.lerp(a, b, u),
math.lerp(c, d, u), mathx.lerp(c, d, u),
v v
) )
end end
@ -139,7 +139,7 @@ end
--return a random value between two numbers (continuous) --return a random value between two numbers (continuous)
function mathx.random_lerp(min, max, _r) function mathx.random_lerp(min, max, _r)
return math.lerp(min, max, _random(_r)) return mathx.lerp(min, max, _random(_r))
end end
--nan checking --nan checking