I like converting old BASIC games - I ran across one that had this odd formula. Currently I am writing in Pascal, but I can write it in any language. After rummaging through the code, I could not find if this var in use, but still would like to know what kind of math shortcut BASIC was using back in the day.
d1 = 1-(( 0.23 + random / 10 ) * (-(d <= 50 )))
d1
is a dummy var, d
= depth of sub
I broke it down into steps and found that part (-(d <= 50))
causes my compile to fail.
Can someone shed some light on to it?