Skip to content

Commit

Permalink
fixed files form Math #79
Browse files Browse the repository at this point in the history
  • Loading branch information
tdurieux committed Mar 7, 2017
1 parent a1661ca commit 1206eff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions projects/Math/79/org/apache/commons/math/util/MathUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -1621,9 +1621,9 @@ public static double distance(double[] p1, double[] p2) {
* @return the L<sub>2</sub> distance between the two points
*/
public static double distance(int[] p1, int[] p2) {
int sum = 0;
double sum = 0;
for (int i = 0; i < p1.length; i++) {
final int dp = p1[i] - p2[i];
final double dp = p1[i] - p2[i];
sum += dp * dp;
}
return Math.sqrt(sum);
Expand Down

0 comments on commit 1206eff

Please sign in to comment.