Skip to content

vec4

Struct | orca.geometry

4D vector structure

Overview

Fields

Field Type Description
x float X coordinate component
y float Y coordinate component
z float Z coordinate component
w float W coordinate component

Methods

set(float, float, float, float)

Sets all vector components

Parameter Type Description
x float New X component value
y float New Y component value
z float New Z component value
w float New W component value

scale(float) → vec4

Returns a scaled copy of the vector

Parameter Type Description
s float Scale factor to apply

Returns: vec4 — New scaled vector

lerp(vec4, float) → vec4

Linear interpolation between this vector and another

Parameter Type Description
other vec4 Target vector to interpolate towards
t float Interpolation factor (0.0 = this vector, 1.0 = other vector)

Returns: vec4 — Interpolated vector