rename mix to lerp
This commit is contained in:
parent
b4bcfb7929
commit
4193fcb473
4
math.d
4
math.d
@ -922,7 +922,7 @@ Inverse(Mat4 mat)
|
|||||||
}
|
}
|
||||||
|
|
||||||
pragma(inline) f32
|
pragma(inline) f32
|
||||||
Mix(f32 x, f32 y, f32 a)
|
Lerp(f32 x, f32 y, f32 a)
|
||||||
{
|
{
|
||||||
return x * (1 - a) + y * a;
|
return x * (1 - a) + y * a;
|
||||||
}
|
}
|
||||||
@ -937,7 +937,7 @@ pragma(inline) f32
|
|||||||
Remap(f32 v, f32 in_min, f32 in_max, f32 out_min, f32 out_max)
|
Remap(f32 v, f32 in_min, f32 in_max, f32 out_min, f32 out_max)
|
||||||
{
|
{
|
||||||
f32 t = InverseLerp(v, in_min, in_max);
|
f32 t = InverseLerp(v, in_min, in_max);
|
||||||
return Mix(out_min, out_max, t);
|
return Lerp(out_min, out_max, t);
|
||||||
}
|
}
|
||||||
|
|
||||||
unittest
|
unittest
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user