• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Are Exponentials ( e ^ x) Possible?

Status
Not open for further replies.
I found a simplified equation for representing a bouncing motion on StackExchange.

y=(e^-x)*abs(4cos(5x))
My question is does anyone know if there is a way to represent the number "e" in WE or Jass without hardcoding its value? Haven't seen anything in the triggers that suggest it exists.



EDIT:
The solution in Jass (Thanks to MyPad), where

y = height
x = the distance from the starting point
bounces = the number of bounces
maxheight = the max value of y

y =( Pow(bj_E, (-1* x) ) )*RAbsBJ( maxheight * Cos( bounces * x))

EDIT 2:
Had to play around with the equation a bit in a calculator, but this gave me a really nice bouncing animation for anyone who needs, where 250 is the desired height of the bounced Special Effect.


MoBOUNCE.PNG
 
Last edited:
Status
Not open for further replies.
Top