Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

twig

Twig is a tiny library used primarily for finding the mid-point of a path or polyline on a 2D plane.

Rough usage:

import { findMidpoint } from "/path/to/path";

const path = [
    { x: 0, y: 0 },
    { x: 10, y: 10 },
    { x: 20, y: 20 },
    { x: 30, y: 30 }
];

const midpoint = findMidpoint(path);
// midpoint = { x: 15, y: 15 }

About

A tiny library for finding the mid-point of a path or polyline on a 2D plane

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages