Java Array Value Add ArrayAdd(float[] a, int[] b)

Here you can find the source of ArrayAdd(float[] a, int[] b)

Description

Array Add

License

Open Source License

Declaration

public static void ArrayAdd(float[] a, int[] b) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static void ArrayAdd(float[] a, int[] b) {
        for (int i = 0; i < a.length; i++) {
            a[i] += b[i];/*from  w w  w  . j a v a  2s  . c o m*/
        }
    }

    public static void ArrayAdd(int[] a, int[] b) {
        for (int i = 0; i < a.length; i++) {
            a[i] += b[i];
        }
    }

    public static void ArrayAdd(float[] a, float[] b) {
        for (int i = 0; i < a.length; i++) {
            a[i] += b[i];
        }
    }

    public static void ArrayAdd(float[] a, float[] b, float scale) {
        for (int i = 0; i < a.length; i++) {
            a[i] += b[i] * scale;
        }
    }

    public static void ArrayAdd(float[] a, int[] b, float scale) {
        for (int i = 0; i < a.length; i++) {
            a[i] += Math.floor(b[i] * scale);
        }
    }
}

Related

  1. arrayAdd(double[] d1, double d2[])
  2. arrayAdd(final Double[] first, final Double[] second)
  3. ArrayScale(float[] a, float b)