Android FloatBuffer Create newFloatBuffer(int numFloats)

Here you can find the source of newFloatBuffer(int numFloats)

Description

new Float Buffer

Declaration

public static FloatBuffer newFloatBuffer(int numFloats) 

Method Source Code

//package com.java2s;

import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.FloatBuffer;

public class Main {
    public static FloatBuffer newFloatBuffer(int numFloats) {
        ByteBuffer buffer = ByteBuffer.allocateDirect(numFloats * 4);
        buffer.order(ByteOrder.nativeOrder());
        return buffer.asFloatBuffer();
    }// w  w w. j  a v a2 s  .  c  o m
}

Related

  1. createDirectFloatBuffer( final int capacity, final FloatBuffer previous)
  2. makeFloatBuffer(float[] arr)
  3. makeFloatBuffer(float[] arr)
  4. makeFloatBuffer(int size)
  5. newFloatBuffer(int numFloats)
  6. newFloatBuffer(int paramInt)
  7. toFloatBuffer(float[] array)
  8. arr2FloatBuffer(float [] arr)
  9. arr2FloatBuffer(float[] coords)