Here you can find the source of toIntArray(double[] a)
Parameter | Description |
---|---|
a | the double array. |
public static int[] toIntArray(double[] a)
//package com.java2s; //License from project: Apache License public class Main { /**/* w w w . j a va 2s . com*/ * Converts a double array to an int array. * * @param a the double array. * @return an int array. */ public static int[] toIntArray(double[] a) { int[] b = new int[a.length]; for (int i = 0; i < a.length; i++) { b[i] = (int) a[i]; } return b; } }