Module @4bitlabs/vec2

License NPM Version NPM Downloads

A simple collection of functions for working with two-component vectors.

import { distanceBetween, vec2 } from '@4bitlabs/vec2';

const a = vec2(10, 20);
const b = vec2(3, 4);
const dist = distanceBetween(a, b);

Index

Type Aliases

Variables

Functions