Main Menu
Menu

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.

Show posts Menu

Topics - dfix

#1
Support / calcAngle returns "NaN"
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...

     
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

:(