Skip to content
/ twig Public

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

License

Notifications You must be signed in to change notification settings

GHvW/twig

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

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published