# how do you use system|math|exponent?

### » Wed Jan 28, 2009 10:52 pm

x to the y power
exp() ?

where do I put the x and the y?
Spriter Dev
B
103
S
22
G
12
Posts: 3,285
Reputation: 17,151

### » Wed Jan 28, 2009 11:02 pm

I don't know what purpose that serves. You can do exponents using the "^" symbol, like this: x^y
Moderator
B
115
S
41
G
20
Posts: 1,586
Reputation: 19,196

### » Wed Jan 28, 2009 11:05 pm

Yup, x^y. Exp is the inverse of ln (logarithm with base e). See http://en.wikipedia.org/wiki/Exponential_function
B
2
S
1
G
4
Posts: 60
Reputation: 1,320

### » Wed Jan 28, 2009 11:20 pm

thanks guys!

this was getting a little cumbersome:
sqrt((Sprite3[Physics].VelocityX*Sprite3[Physics].VelocityX)-
(Sprite3[Physics].VelocityY*Sprite3[Physics].VelocityY))

Spriter Dev
B
103
S
22
G
12
Posts: 3,285
Reputation: 17,151

### » Thu Jan 29, 2009 1:21 am

Or use distance(0, 0, Sprite3[Physics].VelocityX, Sprite3[Physics].VelocityY)
Scirra Founder
B
414
S
245
G
92
Posts: 25,207
Reputation: 200,355

### » Thu Jan 29, 2009 9:25 am

[quote="Ashley":2ojwnwsf]Or use distance(0, 0, Sprite3[Physics].VelocityX, Sprite3[Physics].VelocityY)[/quote:2ojwnwsf]
I was looking for a distance function. can't believe I didn't see that the first time. at least now I now how to do exponents, too

thanks again ash
Spriter Dev
B
103
S
22
G
12
Posts: 3,285
Reputation: 17,151

### » Thu Jan 29, 2009 9:33 am

Hehe, you ask one question, you learn many things!
B
62
S
21
G
13
Posts: 1,910
Reputation: 13,685