Пример #1
0
 /**
  * Returns the angle between the other vector, in radians. (result is ranged 0-PI).
  *
  * @param vec Other vector
  */
 public double angle(Vector vec) {
   double dot = dot(vec);
   return Math.acos(dot / (this.magnitude() * vec.magnitude()));
 }