Java Float to Boolean floatToBoolean(float[] values)

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

Description

float To Boolean

License

Open Source License

Declaration

public static boolean[] floatToBoolean(float[] values) 

Method Source Code

//package com.java2s;

public class Main {
    public static boolean[] floatToBoolean(float[] values) {
        if (values == null) {
            return null;
        }//  www.jav a 2s .  co  m

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

Related

  1. floatToboolean(final float value)
  2. floatToBoolean(float f)