Java Float to Int floatToInt(float[] values)

Here you can find the source of floatToInt(float[] values)

Description

float To Int

License

Open Source License

Declaration

public static int[] floatToInt(float[] values) 

Method Source Code

//package com.java2s;

public class Main {
    public static int[] floatToInt(float[] values) {
        if (values == null) {
            return null;
        }//from www  . ja va 2s  . c  om

        int[] results = new int[values.length];
        for (int i = 0; i < values.length; i++) {
            results[i] = (int) values[i];
        }
        return results;
    }
}

Related

  1. floatToInt(float f)
  2. floatToInt(float f, int defaultValue)
  3. floatToInt(float[] ints)
  4. floatToInt(String flot)
  5. floatToInteger(final float value)
  6. floatToInteger(float f, float f2, float offset, boolean rotate)