• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • It's time for the first HD Modeling Contest of 2025. Join the theme discussion for Hive's HD Modeling Contest #7! Click here to post your idea!

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