Skip to content

shawnwhinnery/V2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

V2

2D vector arithmetic for Node and the browser.

Usage


radToDeg(1) // 57.29578

degToRad(57.29578) // 1

vecToRad({ x: 0, y: 0 }) // 0

vecToRad(0) // { x: 0, y: 0 }

normalize({ x: 10, y: 5 }) // { x: 1, y: 0.5 }

random()

add()

subtract()

multiply()

distance()

direction()

average()

center()

lerp()

lerpCurveSegment()

lerpCurve()

About

2D vector math

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages