Java Double Number Create toDouble(int[] rgb)

Here you can find the source of toDouble(int[] rgb)

Description

Converts an integer array to a double array.

License

BSD License

Parameter

Parameter Description
rgb The integer array to convert

Return

The array of doubles

Declaration

public static double[] toDouble(int[] rgb) 

Method Source Code

//package com.java2s;
/**/*from ww  w . ja v  a 2 s  .  com*/
 * CamanJ - Java Image Manipulation
 * Ported from the CamanJS Javascript library
 *
 * Copyright 2011, Ryan LeFevre
 * Licensed under the new BSD License
 * See LICENSE for more info.
 * 
 * Project Home: http://github.com/meltingice/CamanJ
 */

public class Main {
    /**
     * Converts an integer array to a double array.
     * 
     * @param rgb
     *            The integer array to convert
     * @return The array of doubles
     */
    public static double[] toDouble(int[] rgb) {
        return new double[] { (double) rgb[0], (double) rgb[1], (double) rgb[2] };
    }
}

Related

  1. toDouble(float[] val, int days, int start)
  2. toDouble(float[][] a)
  3. toDouble(int x)
  4. toDouble(int[] array)
  5. toDouble(int[] array)
  6. toDouble(int[][] arr)
  7. toDouble(Number n)
  8. toDouble(Number number)
  9. toDouble(Number value)