vector-fns

Utilities for working immutably with vectors

Usage no npm install needed!

<script type="module">
  import vectorFns from 'https://cdn.skypack.dev/vector-fns';
</script>

README

vector-fns

Utilities for working immutably with vectors

Concept

Inspired by the fantastic date-fns library, I wanted a simple library that could let me work with n-dimensional vectors in an immutable fashion.

Installation

yarn add vector-fns

or

npm install vector-fns

Usage

You can import the entire library and destructure what you need, like so:

import { add, crossProduct } from "vector-fns";

or you can pick what you want:

import { add } from "vector-fns/lib/add";
import { crossProduct } from "vector-fns/lib/crossProduct";