UNPKG

roslib

Version:

The standard ROS Javascript Library

58 lines (57 loc) 1.18 kB
import { PartialNullable } from '../types/interface-types.ts'; export interface IQuaternion { /** * The x value. */ x: number; /** * The y value. */ y: number; /** * The z value. */ z: number; /** * The w value. */ w: number; } /** * A Quaternion. */ export default class Quaternion implements IQuaternion { x: number; y: number; z: number; w: number; constructor(options?: PartialNullable<IQuaternion> | null); /** * Perform a conjugation on this quaternion. */ conjugate(): void; /** * Return the norm of this quaternion. */ norm(): number; /** * Perform a normalization on this quaternion. */ normalize(): void; /** * Convert this quaternion into its inverse. */ invert(): void; /** * Set the values of this quaternion to the product of itself and the given quaternion. * * @param q - The quaternion to multiply with. */ multiply(q: IQuaternion): void; /** * Clone a copy of this quaternion. * * @returns The cloned quaternion. */ clone(): Quaternion; }