cgartashish Posted December 5, 2017 Share Posted December 5, 2017 Hi, I was watching a tutorial and the instructor used negative value in fit range node's source min parameter and then he said that as there is a negative value in source min so he will have to flip the the destination min to 1 and destination max to 0. I don't know why we must do that. Can anybody please explain the math behind this? Fit Range Node's details: source min = -5, source max = 1, destination min = 1, destination max = 0. in the value parameter he takes some random attribute that ranges from -5 to 5 based on the point numbers. Quote Link to comment Share on other sites More sharing options...
f1480187 Posted December 5, 2017 Share Posted December 5, 2017 This will reverse output. In this case, where range 0..1 will output 0, range 1..0 will output 1: src [-5, 0]: -5.0 -4.5 -4.0 -3.5 -3.0 -2.5 -2.0 -1.5 -1.0 -0.5 0.0 dest [0, 1]: 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 src [-5, 0]: -5.0 -4.5 -4.0 -3.5 -3.0 -2.5 -2.0 -1.5 -1.0 -0.5 0.0 dest [1, 0]: 1.0 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0.0 Not necessary to swap destination min and max if the source min is negative, the instructor probably had some reason to invert the range (better logic, later convenience, etc.). Try visualize the value. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.