Java Double to Boolean doubleToBoolean(double[] values)

Here you can find the source of doubleToBoolean(double[] values)

Description

double To Boolean

License

Open Source License

Declaration

public static boolean[] doubleToBoolean(double[] values) 

Method Source Code

//package com.java2s;

public class Main {
    public static boolean[] doubleToBoolean(double[] values) {
        if (values == null) {
            return null;
        }//from  www .j  a  va  2  s  .  c  o m

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

Related

  1. doubleToBoolean(double d)
  2. doubleToBoolean(double value)
  3. doubleToboolean(final double value)