Skip to content

Instantly share code, notes, and snippets.

@jaycody
Created March 12, 2014 07:14
Show Gist options
  • Save jaycody/9502251 to your computer and use it in GitHub Desktop.
Save jaycody/9502251 to your computer and use it in GitHub Desktop.
pro.Polar->Cartesian-Conversion
// Convert Polar to Cartesian
// according to SOHCAHTOA, cos(theta)=1 and sin(theta) = 0 when theta = 0 (aka (1,0))
vector = new PVector(cos(theta), sin(theta));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment