Interface Vec4

Vec4 is an interface for 4-element vector objects.

The primary use for a Vec4 object is as homogeneous coordinates in 3D geometry, or to represent e.g. RGBA colours.

The module vec4 contains functions to manipulate objects conforming to this interface

Example usage:

import { Vec4 } from '@spissvinkel/maths';

Hierarchy

  • Vec4

Properties

x y z w

Properties

x: number

The first element

y: number

The second element

z: number

The third element

w: number

The fourth element

Generated using TypeDoc