Is lerp() identical to fit01()?

   1454   3   1
User Avatar
Member
99 posts
Joined: Sept. 2021
Offline
Hello,

do the VEX-Functions lerp() and fit01() do exactly the same, or is there some difference I dind't notice?

In my tests lerp(min,max,var) is the same result as fit01(var,min,max) (which seems logical to me), so is there any benefit in them both existing?
Or are there also other Functions which behave identical?
=================
Intel core i7 6700K
64 GB DDR4 RAM
Nvidia GeForce RTX 3060
User Avatar
Member
2164 posts
Joined: Sept. 2015
Offline
It can be a matter of convenience when the input arguments are reference values being used elsewhere as well.
User Avatar
Member
9384 posts
Joined: July 2007
Offline
fit01() is clamped, lerp() is not so it's more like efit01() if that one existed

But regardless, it would be stranger if there was only fit(), fit11() but then you had to know that if the input is 0-1 range you'd have to use lerp()
(as that's standard function in many languages so that one would most likely exist) so fit01 makes sense for completeness anyway
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
99 posts
Joined: Sept. 2021
Offline
Ah well, knowing the background helps to understand all these tools, thank you very much!
=================
Intel core i7 6700K
64 GB DDR4 RAM
Nvidia GeForce RTX 3060
  • Quick Links