Skip to content

Instantly share code, notes, and snippets.

@ruthenium
Forked from cevherkarakoc/polarToCartesian.js
Created February 24, 2017 17:19
Show Gist options
  • Save ruthenium/3fe75c0034924553c8665429aad5af7c to your computer and use it in GitHub Desktop.
Save ruthenium/3fe75c0034924553c8665429aad5af7c to your computer and use it in GitHub Desktop.
Converting polar coordinates to cartesian coordinates
function polarToCartesian(radius,radian){
return {
x:radius*Math.cos(radian),
y:radius*Math.sin(radian)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment