get

fun get(): Float

Relative get method. Reads the float at the current position and then increments the position.

Return

the float value at the current position.

Throws

if there are no floats remaining.


fun get(index: Int): Float

Absolute get method. Reads the float at the specified index (in floats) without changing the current position. Incorporates the baseOffset for sliced buffers.

Return

the float value at the given index.

Parameters

index

the index (in floats) from which to read.

Throws

if index is out of bounds [0, limit).


fun get(dst: FloatArray, offset: Int, length: Int): FloatBuffer

Relative bulk get method.

Transfers length floats from this buffer into the destination dst array, starting at the current position and at the specified offset in dst. After copying, the buffer's position is advanced by length.

Return

This buffer.

Parameters

dst

The destination array.

offset

The starting offset in the destination array.

length

The number of floats to transfer.

Throws

if there are fewer than length floats remaining.


Relative bulk get method.

Transfers floats from this buffer into the destination dst array. This method behaves the same as get(dst, 0, dst.size).

Return

This buffer.

Parameters

dst

The destination array, filled from the current position.

Throws

if there are fewer than dst.size floats remaining.