2.1.1 • Published 10 months ago

voctor v2.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

Voctor

Voctor is a versatile and high-performance library for vector mathematics, providing easy-to-use implementations for vectors. Ideal for applications in graphics, gaming, and scientific computing, it offers efficient arithmetic operations, vector manipulations, and utility functions like normalization and distance calculations. Integrate voctor into your project with ease to streamline vector operations and enhance your computational tasks.

npm version License: MIT

Installation:

npm install voctor

Usage Example:

import { Vec2, Vec3 } from "voctor";

{
    const a = new Vec2(1, 5);
    const b = Vec2.fromArray([1, 0]);

    console.log(a.add(b)); // Vec2 { x: 2, y: 5 }
}

{
    const a = Vec3.fromScaler(100);
    const b = Vec3.fromObject({
        x: 1,
        y: 8,
        z: 16,
    });

    console.log(a.sub(b)); // Vec3 { x: 99, y: 92, z: 84 }
}
2.1.1

10 months ago

2.1.0

10 months ago

2.0.0

10 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago