You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Names obviously can be bikeshedded over to infinity, I'll admit that lerp/unlerp are bad ones. (GLSL goes with mix, HLSL goes with lerp, i've seen packages do linearInterpolate or interpolate and inverseLinearInterpolate, etc -- although those seem much too verbose to me).
Anyway, it seems extremely likely to me that linear interpolation is more common than linear remapping, and so a lerp/unlerp pair would get more use than Math.scale (even if they can be implemented by passing 0 and 1 as lo/hi values for Math.scale).
Including all 3 would be fine by me as well.
(P.S. other than that I'd like to thank you for including RAD_PER_DEG/DEG_PER_RAD as a constant in addition to a function!)
The text was updated successfully, but these errors were encountered:
Names obviously can be bikeshedded over to infinity, I'll admit that lerp/unlerp are bad ones. (GLSL goes with mix, HLSL goes with lerp, i've seen packages do linearInterpolate or interpolate and inverseLinearInterpolate, etc -- although those seem much too verbose to me).
Anyway, it seems extremely likely to me that linear interpolation is more common than linear remapping, and so a lerp/unlerp pair would get more use than Math.scale (even if they can be implemented by passing 0 and 1 as lo/hi values for Math.scale).
Including all 3 would be fine by me as well.
(P.S. other than that I'd like to thank you for including RAD_PER_DEG/DEG_PER_RAD as a constant in addition to a function!)
The text was updated successfully, but these errors were encountered: