title: Convert 2D Double to 2D Float
body: <p>Does anybody know how to convert a two dimensional array from double to float I have the following:</p>
  
  <pre><code>double [][] matrix = new double[width][height];
  </code></pre>
  
  <p>I want to convert the data within the variable data to Flaot so i have a new variable as follows:</p>
  
  <pre><code>float [][] floatmatrix = new float[width][height];
  </code></pre>
  
  <p>I tried casting but its not allowed e.g</p>
  
  <pre><code>float[][] data = (float[][]) result;
  </code></pre>