Soulshadow
New Member
- Reaction score
- 6
Okay, I'm trying to learn some basic JASS, starting with mathematical expressions. I got so far that to do addition subtraction multiplication and division you simply use the keys that refer to those expressions (+,-,*,/ respectfully). However, (^) does not seem to work for powers. Here's an example of the line of code that is failing to work and what I need.
The formula for damage is 20X+50*(1.4^X).
Code:
private function Damage takes unit u returns real
return 20. * SpellLevel(u) + 50. * (SpellLevel(u) ^ 1.4)
endfunction
The formula for damage is 20X+50*(1.4^X).