Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - dfix

Pages: [1]
1
Support / calcAngle returns "NaN"
« on: May 02, 2017, 04:13:53 am »
Hi, Can someone help me?

I am trying to calculate the angle between two vectors, but the only results I get are "NaN". I am sure it is something I am doing wrong...

Code: [Select]
     
 v=new SimpleVector(0,0,0);
ov=new SimpleVector(1,1,10);
float angle = v.calcAngle(ov);
Logger.log("angle:"+String.valueOf(angle));

The Android Monitor just outputs:

I/jPCT-AE: angle:NaN

 :(

Pages: [1]