Compartir a través de


FloatBuffer.Wrap Method

Definition

Overloads

Wrap(Single[])

Wraps a float array into a buffer.

Wrap(Single[], Int32, Int32)

Wraps a float array into a buffer.

Wrap(Single[])

Wraps a float array into a buffer.

[Android.Runtime.Register("wrap", "([F)Ljava/nio/FloatBuffer;", "")]
public static Java.Nio.FloatBuffer? Wrap (float[]? array);
[<Android.Runtime.Register("wrap", "([F)Ljava/nio/FloatBuffer;", "")>]
static member Wrap : single[] -> Java.Nio.FloatBuffer

Parameters

array
Single[]

The array that will back this buffer

Returns

The new float buffer

Attributes

Remarks

Wraps a float array into a buffer.

The new buffer will be backed by the given float array; that is, modifications to the buffer will cause the array to be modified and vice versa. The new buffer's capacity and limit will be array.length, its position will be zero, and its mark will be undefined. Its #array backing array will be the given array, and its #arrayOffset array offset> will be zero.

Java documentation for java.nio.FloatBuffer.wrap(float[]).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Wrap(Single[], Int32, Int32)

Wraps a float array into a buffer.

[Android.Runtime.Register("wrap", "([FII)Ljava/nio/FloatBuffer;", "")]
public static Java.Nio.FloatBuffer? Wrap (float[]? array, int offset, int length);
[<Android.Runtime.Register("wrap", "([FII)Ljava/nio/FloatBuffer;", "")>]
static member Wrap : single[] * int * int -> Java.Nio.FloatBuffer

Parameters

array
Single[]

The array that will back the new buffer

offset
Int32

The offset of the subarray to be used; must be non-negative and no larger than array.length. The new buffer's position will be set to this value.

length
Int32

The length of the subarray to be used; must be non-negative and no larger than array.length - offset. The new buffer's limit will be set to offset + length.

Returns

The new float buffer

Attributes

Exceptions

if either start or floatCount is invalid.

if array is null.

Remarks

Wraps a float array into a buffer.

The new buffer will be backed by the given float array; that is, modifications to the buffer will cause the array to be modified and vice versa. The new buffer's capacity will be array.length, its position will be offset, its limit will be offset + length, and its mark will be undefined. Its #array backing array will be the given array, and its #arrayOffset array offset will be zero.

Java documentation for java.nio.FloatBuffer.wrap(float[], int, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to