sign() question
Posted: 11 Feb 2013 11:34
hi
if i used : dir = sign(speed) I receive value like :
0. nan 0.
nan nan 0.
...
my code is :
(script on frame) :
decl i;
for (i=0;i<3;i++){
Accel_XYZ = accelerometer;
}
(on expression) : speed = Accel_XYZ-Last_XYZ
speed values are float whose oscillate between +0. / -0.
sign can run with float ?
my interest is detect if I'm on acceleration or deceleration.
thanks for your help
O-O
if i used : dir = sign(speed) I receive value like :
0. nan 0.
nan nan 0.
...
my code is :
(script on frame) :
decl i;
for (i=0;i<3;i++){
Accel_XYZ = accelerometer;
}
(on expression) : speed = Accel_XYZ-Last_XYZ
speed values are float whose oscillate between +0. / -0.
sign can run with float ?
my interest is detect if I'm on acceleration or deceleration.
thanks for your help
O-O