Java Array Sum sum3(double[] a, double[] b)

Here you can find the source of sum3(double[] a, double[] b)

Description

get the sum of two 3-dimension vector

License

Apache License

Parameter

Parameter Description
Vector B double[x,y,theta]

Return

the vector which represent the sum

Declaration

public static double[] sum3(double[] a, double[] b) 

Method Source Code

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

public class Main {
    /**/*from  w  ww  .ja v  a  2 s.c o m*/
     * get the sum of two 3-dimension vector
     * @param Vector A double[x,y,theta]
     * @param Vector B double[x,y,theta]
     * @return the vector which represent the sum
     */
    public static double[] sum3(double[] a, double[] b) {
        return new double[] { a[0] + b[0], a[1] + b[1], a[2] + b[2] };
    }
}

Related

  1. sum(Number[] numbers)
  2. sum(Object[] srcOne, Object[] srcTwo)
  3. sum(short tab[], int a, int b)
  4. sum(short[] ary)
  5. sum(String[] tokens, int start, int length, String separator)
  6. sum_configurations(int[] elements, int sum)
  7. sumabs(double[] in)
  8. sumandsub(String[] X)
  9. sumArray(double inputArray[])