Skip to content
Permalink
Browse files
using commons-numbers Norm enum
  • Loading branch information
darkma773r committed Jun 12, 2021
1 parent b9ff14e commit f5577663ebbf9e53b7b8b3178e6ac732f9c10fca
Showing 1 changed file with 2 additions and 2 deletions.
@@ -17,7 +17,7 @@
package org.apache.commons.geometry.euclidean.internal;

import org.apache.commons.geometry.core.Vector;
import org.apache.commons.numbers.core.Norms;
import org.apache.commons.numbers.core.Norm;

/** This class consists exclusively of static vector utility methods.
*/
@@ -104,7 +104,7 @@ public static double norm(final double x1, final double x2) {
* @see <a href="http://mathworld.wolfram.com/L2-Norm.html">L2 Norm</a>
*/
public static double norm(final double x1, final double x2, final double x3) {
return Norms.euclidean(x1, x2, x3);
return Norm.EUCLIDEAN.of(x1, x2, x3);
}

/** Get the square of the L<sub>2</sub> norm (also known as the Euclidean norm)

0 comments on commit f557766

Please sign in to comment.