@equinor/videx-vector2
TypeScript icon, indicating that this package has built-in type declarations

1.0.44 • Public • Published

Videx Vector2

Vector2 class library written in javascript.

Installation

npm install --save @equinor/videx-vector2

Usage

// ES6
import Vector2 from '@equinor/videx-vector2';

// ObservableHQ
Vector2 = require('@equinor/videx-vector2@X.X.X');

Where X.X.X is desired version number.

Available functions

Properties

[0] [1] length mutate

Accessors

x y immutable magnitude
mutable

Static properties

up right down left
zero one positiveInfinity negativeInfinity

Methods

add clampMagnitude clone isZeroVector
modify normalize normalized rescale
rotate rotateDeg rotate90 rotate180
rotate270 scale set sub
subFrom toArray

Static methods

add angle angleDeg angleRight
angleRightDeg cross distance divide
dot isZeroVector lerp lerpRot
multiply signedAngle signedAngleDeg sub

Equinor Logo

Readme

Keywords

Package Sidebar

Install

npm i @equinor/videx-vector2

Weekly Downloads

235

Version

1.0.44

License

MIT

Unpacked Size

45.9 kB

Total Files

9

Last publish

Collaborators

  • johannesleite
  • nadiabertha
  • hnj
  • tomktjemsland
  • brynjulf
  • olms