Skip to content
Select language:English

MCL 1.3.5

fun wrap(v: DoubleArray, start: Int = 0): Vec3f

Creates a Vec3f from a portion of a DoubleArray.

Starting from the given start index, the next 3 elements are read, converted to Float, and mapped to the vector components in order: x, y, z.

Return

A new Vec3f containing the selected values.

Parameters

v

The source array.

start

The starting index in the array.

Throws

if there are not enough elements from start to read 3 values.


fun wrap(v: FloatArray, start: Int = 0): Vec3f

Creates a Vec3f from a portion of a FloatArray.

Starting from the given start index, the next 3 elements are read, and mapped to the vector components in order: x, y, z.

Return

A new Vec3f containing the selected values.

Parameters

v

The source array.

start

The starting index in the array.

Throws

if there are not enough elements from start to read 3 values.