Java Integer Create toIntRound(double[] a)

Here you can find the source of toIntRound(double[] a)

Description

to Int Round

License

Apache License

Declaration

public static final int[] toIntRound(double[] a) 

Method Source Code

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

public class Main {
    public static final int[] toIntRound(double[] a) {
        int[] b = new int[a.length];
        for (int i = 0; i < a.length; i++) {
            b[i] = (int) Math.round(a[i]);
        }//from w  w w.  j a v  a2 s.  c om
        return b;
    }

    public static final int[] toIntRound(float[] a) {
        int[] b = new int[a.length];
        for (int i = 0; i < a.length; i++) {
            b[i] = (int) Math.round(a[i]);
        }
        return b;
    }
}

Related

  1. toIntLE(byte[] value)
  2. toIntList(String valus)
  3. toIntMatrix(Number[][] matrix)
  4. toIntOrNull(String string)
  5. toIntPlusOneString(Object object)
  6. toInts(byte[] bytes)
  7. toInts(byte[] readBuffer, int o, int l)
  8. toInts(byte[] src, int srcOffset, int[] dst, int dstOffset, int length)
  9. toInts(byte[] value, int offset, int num)