Download

Normalize to range,clamp

I was very confused about the two nodes,namely,Normalize to Range and Clamp.
What situations can they be used for?What are the differences between them?
![]N8@I)BUN85B}ILQF7]UBJD.png|573x383](upload://iXx08NxzZxxbdx3ANgi67blfaze.png)

Clamp 1.3 with min 0.0 and max 1.0 will result in 1.0.
Normalize 20 with min 10 and max 50 will result in 0.25. Normalizing 30 in the same range would result in 0.5.

So clamp will cut off all values lower than min and higher than max. Normalize will takes a range and normalizes the incoming number according to the range.

To answer your question in what situation this can be used for.

Clamp: You have a life-bar with a range from 0 to 100 life. If you eat something you increase your life by 27. It makes sense to clamp the result between 0 and 100, to make sure you will not have more than 100 life at the end.
Normalize: You have a waypoint at 100 meter and another one at 300 meter. You are currently at 200 meter and you wanna have a progress bar which shows your progress in percent. For that you normalize 200 to a range of 100 to 300. The result is 0.5 (*100 to get your percentage)

In your screenshot it makes sense to use both. If you enter a value lower than 1000 you will get a negativ result from the upper “Nomalize to Range”. But if you don’t want to have a negativ velocity or a higher velocity than 1, you should clamp it from 0 to 1.