Aizatulin
Hi,
fit() and clamp() are a bit different.
Since clamp() defines min/max boundaries for your values, fit() tranforms the values from one interval into another with respect to their relative position of their interval. For example: If you have the value 0.4 in the (0,1) interval the fit() function will map it to 70 in the (50, 100) interval.
As BabaJ already mentioned, these functions are auxiliary functions, which are usually applied on values, which has to be passed into other functions (like ramps), which expects a specific intput, or it can be used as an output modifier aswell.
Here is a simple example, where both function are applied on the y-value of an input geometry.
Thanks for the explanation, i do believe i understand it, but when i opened your file in clamp and fit functions i saw the following expressions;
for fit @P.y =
fit(@P.y, chf('src_a'), chf('src_b'), chf('tgt_a'), chf('tgt_b'));
for clamp @P.y =
clamp(@P.y, chf('min'), chf('max'));
I was expecting to see numeric values since the fit and clamp work on, but i see chf,src(a,b),tgt(a,b)…i mean, i don't quite understand what does it reference, and where are those references that they point to.
I was expecting someting from the manual, like: fit01(3, 6) something like tha… Could you elaborate the expressions with the ‘'to dummy’' aproach

, or anyone else. It's the first time i encounter the expressions as a learner in the near starting phase.
Edit: Based on what did you set min and max values? I don't see any values that you command through that.