You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gilles (JIRA)" <ji...@apache.org> on 2015/08/14 16:27:46 UTC
[jira] [Comment Edited] (MATH-1244) Add "cosAngle" method in
"MathArrays"
[ https://issues.apache.org/jira/browse/MATH-1244?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14614947#comment-14614947 ]
Gilles edited comment on MATH-1244 at 8/14/15 2:27 PM:
-------------------------------------------------------
commit ed6c47dd9ebbb2e38fb3e17a2b961f0fcf0e6df3 (4.0)
commit 8e049a0ef028ffa332aa147893f702c310e01ce0 (3.6)
was (Author: erans):
commit ed6c47dd9ebbb2e38fb3e17a2b961f0fcf0e6df3
> Add "cosAngle" method in "MathArrays"
> -------------------------------------
>
> Key: MATH-1244
> URL: https://issues.apache.org/jira/browse/MATH-1244
> Project: Commons Math
> Issue Type: New Feature
> Reporter: Gilles
> Assignee: Gilles
> Priority: Trivial
> Fix For: 4.0
>
>
> 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:
> {code}
> public static double cosAngle(double[] v1, double[] v2) {
> return linearCombination(v1, v2) / (safeNorm(v1) * safeNorm(v2));
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)