View Single Post
Old 06-17-2019, 05:01 AM   #492
danerius
Human being with feelings
 
Join Date: Oct 2018
Posts: 173
Default

Quote:
Originally Posted by Fabian View Post
Code:
min(x, y)
returns the smallest value of x and y.

So in the particular case of
Code:
min(slider1/100, 0.999)
when slider1 is 100, 0.999 will be returned, not 1. This is to not get a divide by zero on the next line
Code:
foo = 2*hdistr/(1-hdistr);
as hdistr is guaranteed to never be exactly 1.
Oh... Excellent. Got it now

Im guessing its best practice to include a minimum value?

/thx
danerius is offline   Reply With Quote