Skip to content

The JavaScript library for manipulating Euclidean vector.

Notifications You must be signed in to change notification settings

charming-art/charming-vector

Repository files navigation

Charming Vector

The JavaScript library for manipulating Euclidean vector, which can be used with Charming.js.

Installing

Immutable usage:

import * as cm from "charmingjs-vector";

const v1 = cm.vec(1, 2);
const v2 = cm.vec(2, 3);
const v3 = cm.vecAdd(v1, v2);

v3.x; // 2
v3.y; // 5

Mutable usage:

const v1 = cm.vec(1, 2);
const v2 = cm.vec(2, 3);
v1.add(v2);

v1.x; // 2
v1.y; // 5

About

The JavaScript library for manipulating Euclidean vector.

Resources

Stars

Watchers

Forks

Releases

No releases published