Java Vector vector_norm(double[] vec)

Here you can find the source of vector_norm(double[] vec)

Description

vectonorm

License

Apache License

Declaration

public static double vector_norm(double[] vec) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static double vector_norm(double[] vec) {
        double sum = 0;
        for (double v : vec)
            sum += v * v;// w w w. j  av  a2 s  .c  om
        return Math.sqrt(sum);
    }
}

Related

  1. Vector2fNegate(float[] a, float[] dest)
  2. Vector2fNew()
  3. Vector2fNormalize(float[] a, float[] dest)
  4. vector2string(int[] vector)
  5. vector_dot(double[] vec1, double[] vec2)
  6. vector_sum(double[] v, double[] w)
  7. vectorAbsoluteValue(double X, double Y, double Z)
  8. vectorCos(int[] d1, int[] d2)
  9. vectorDiff(final double[] vecOne, final double[] vecTwo)