Android FloatBuffer Create createFloatBuffer(int size)

Here you can find the source of createFloatBuffer(int size)

Description

create Float Buffer

Declaration

public static FloatBuffer createFloatBuffer(int size) 

Method Source Code

//package com.java2s;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.FloatBuffer;

public class Main {
    public static FloatBuffer createFloatBuffer(int size) {
        ByteBuffer bb = ByteBuffer.allocateDirect(size * 4);
        bb.order(ByteOrder.nativeOrder());
        return bb.asFloatBuffer();
    }//  w  w  w  . j  a va  2  s  . c  om
}

Related

  1. createFloatBuffer(int floatCount)
  2. createFloatBuffer(int nElements, int stride)
  3. createFloatBuffer(int nElements, int stride)
  4. createFloatBuffer(int size)
  5. createFloatBuffer(int size)
  6. createDirectFloatBuffer( final int capacity)
  7. createDirectFloatBuffer( final int capacity, final FloatBuffer previous)
  8. makeFloatBuffer(float[] arr)
  9. makeFloatBuffer(float[] arr)