Skip to content

Instantly share code, notes, and snippets.

@zsumair
zsumair / webdev_online_resources.md
Created July 16, 2018 19:21 — forked from bradtraversy/webdev_online_resources.md
Online Resources For Web Developers (No Downloading)
@zsumair
zsumair / readme.md
Created July 15, 2016 10:14 — forked from xem/readme.md
Maths & trigonometry cheat sheet for 2D games

Conventions

  • o = [xo = 0, yo = 0] is the origin
  • A = [xA, yA] is a point on the 2D plane. Same for B, C, ...
  • lengths are in any unit (ex: pixels)
  • code snippets are in JavaScript

Degrees to radians

angleRad = angleDeg * Math.PI / 180;