; Exp Example ; ----------- ; Exp(x) raises e (2.71828...) to the power x: growth for positive x, ; decay for negative x. Log() is its inverse. Print "Exp(0) = "+Exp(0) Print "Exp(1) = "+Exp(1)+" (this is e itself)" Print "Exp(2) = "+Exp(2) Print "Exp(-1) = "+Exp(-1) Print "" ; Exponential decay gives natural damage falloff: full damage up ; close, fading smoothly with distance but never quite reaching zero Print "Explosion damage at increasing distance:" For dist=0 To 50 Step 10 damage#=100*Exp(-dist/15.0) Print RSet(dist,4)+"m : "+Int(damage)+" damage" Next Print "" Print "Press any key to close the example" WaitKey End