Details
-
New Feature
-
Status: Resolved
-
Trivial
-
Resolution: Fixed
-
None
-
None
-
None
Description
Similar to other utilities (e.g. "distance") that interprets a Java array as Cartesian coordinates, I propose to add the function that calculates the cosine of the angle between two vectors:
public static double cosAngle(double[] v1, double[] v2) { return linearCombination(v1, v2) / (safeNorm(v1) * safeNorm(v2));