Skip to content

Instantly share code, notes, and snippets.

View Enivel's full-sized avatar
💭
I may be slow to respond.

Levine Enivel

💭
I may be slow to respond.
View GitHub Profile
@Enivel
Enivel / readme.md
Created September 15, 2022 07:01 — forked from xem/readme.md
Maths & trigonometry cheat sheet for 2D & 3D games

Conventions

  • 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;