Skip to content

Instantly share code, notes, and snippets.

Tyler Larson talltyler

  • New York City
Block or report user

Report or block talltyler

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
xem /
Last active Jan 22, 2020
Maths & trigonometry cheat sheet for 2D & 3D games


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

You can’t perform that action at this time.