Atlas Engine
API Referenceatlasatlas/units

Quaternion

Four-component orientation with conversion to and from Euler rotations.

Module: atlas/units

Four-component orientation with conversion to and from Euler rotations.

Declaration

export class Quaternion { ... }

Constructors

Creates a new quaternion.

constructor(x: number, y: number, z: number, w: number);

Creates a new quaternion.

constructor(rotation: Rotation3d);

Properties

x

The X.

x: number;

y

The Y.

y: number;

z

The Z.

z: number;

w

The quaternion scalar component.

w: number;

Methods

toEuler

To euler.

toEuler(): Rotation3d;

fromEuler

Creates a value from euler.

static fromEuler(rotation: Rotation3d): Quaternion;

On this page