Skip to content

Instantly share code, notes, and snippets.

View YesIDont's full-sized avatar

Mateusz Fryc YesIDont

View GitHub Profile
@YesIDont
YesIDont / Vector2D.js
Created October 23, 2020 21:42
JavaScript 2D Vector Class
/*
Simple 2D JavaScript Vector Class
Hacked from evanw's lightgl.js
https://github.com/evanw/lightgl.js/blob/master/src/vector.js
*/
function Vector(x, y) {