The need for a remap() function (also called efit() in VEX) is very common in shading, and it would be appreciated if the standard library included it natively.
So far, of course, we can remap vectors or floats by simply defining the function manually:
The need for a remap() function (also called efit() in VEX) is very common in shading, and it would be appreciated if the standard library included it natively.
So far, of course, we can remap vectors or floats by simply defining the function manually:
But, having it part of the std would simplify code and ensure a proper implementation: