Android FloatBuffer Create toFloatBuffer(float[] array)

Here you can find the source of toFloatBuffer(float[] array)

Description

to Float Buffer

License

Apache License

Declaration

public static FloatBuffer toFloatBuffer(float[] array) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.nio.*;

public class Main {
    public static FloatBuffer toFloatBuffer(float[] array) {
        ByteBuffer bb = ByteBuffer.allocateDirect(array.length << 2);
        bb.order(ByteOrder.nativeOrder());
        bb.position(0);/*  www.  j  a v a 2  s.  co m*/
        FloatBuffer fbb = bb.asFloatBuffer();
        fbb.put(array);
        return fbb;
    }
}

Related

  1. makeFloatBuffer(float[] arr)
  2. makeFloatBuffer(int size)
  3. newFloatBuffer(int numFloats)
  4. newFloatBuffer(int numFloats)
  5. newFloatBuffer(int paramInt)
  6. arr2FloatBuffer(float [] arr)
  7. arr2FloatBuffer(float[] coords)
  8. floatToBuffer(float[] a)
  9. floatToBuffer(float[] a)