Java Vector Length Get vectorLength(double[] vector)

Here you can find the source of vectorLength(double[] vector)

Description

vector Length

License

Open Source License

Declaration

public static double vectorLength(double[] vector) 

Method Source Code

//package com.java2s;

public class Main {
    public static double vectorLength(double[] vector) {
        double sum = 0.d;
        for (double dd : vector)
            sum += dd * dd;/*  ww w  .  j ava 2  s. c  o  m*/
        return Math.sqrt(sum);
    }
}

Related

  1. vectorLength(double[] vector)
  2. vectorLength(Double[] vector)
  3. vectorLengthDyDx(double dy, double dx)
  4. vectorLengthSquared(float vx, float vy, float vz)