vec3

fun vec3(x: Float = 0.0f, y: Float = 0.0f, z: Float = 0.0f): Vector3

Constructs a new Vector3 instance. An equivalent of Vector3 constructor that supports Kotlin syntax features: named parameters with default values.

Return

a new Vector3 instance storing the passed values.

Parameters

x

the X component. Defaults to 0f.

y

the Y component. Defaults to 0f.

z

the Z component. Defaults to 0f.


fun vec3(vector2: Vector2, z: Float = 0.0f): Vector3

Constructs a new Vector3 instance. An equivalent of Vector3 constructor that supports Kotlin syntax features: named parameters with default values.

Return

a new Vector3 instance storing the passed values.

Parameters

vector2

stores the X and Y components. Will be copied.

z

the Z component. Defaults to 0f.