Hi folks!
The expression
"Math.pow( Math.E, time )" keeps giving me a "divide by zero" error.
This seems to be similar to problems others have had, but the other solutions don't quite work in my case, since Math.E isn't negative. "time" of course is a non-integer, but the expression doesn't even work for me if I replace it with "Math.ceil(time)."
Can anybody tell me what I'm missing? Thanks in advance!
--S
Thanks for the reply!
My original expression was
thet = time;
a = 2;
b = 0.5;
exp = Math.pow(Math.E, b*thet);
posx = a*exp*Math.cos(thet);
posy = a*exp*Math.sin(thet);
[640, 640] + [posx, posy]
except that a and b were slider values. If I use Math.exp,
thet = time;
a = 2;
b = 0.5;
exp = Math.exp(b*thet);
posx = a*exp*Math.cos(thet);
posy = a*exp*Math.sin(thet);
[640, 640] + [posx, posy]
I get the same error. I found a work-around by attaching theta to a slider instead, but I'm still curious to know what the problem was.
Thanks again!
--S
North America
Europe, Middle East and Africa
Asia Pacific