commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (MATH-1244) Add "cosAngle" method in "MathArrays"
Date Mon, 06 Jul 2015 12:07:04 GMT

     [ https://issues.apache.org/jira/browse/MATH-1244?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Gilles resolved MATH-1244.
--------------------------
       Resolution: Fixed
    Fix Version/s:     (was: 3.6)

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)

Mime
View raw message