Skip to content

Instantly share code, notes, and snippets.

@ikeryou
Created September 1, 2016 06:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ikeryou/a8597269f75bc6386ae16b1ea832aee0 to your computer and use it in GitHub Desktop.
Save ikeryou/a8597269f75bc6386ae16b1ea832aee0 to your computer and use it in GitHub Desktop.
三角関数
// x = 底辺
// y = 対辺
// r = 斜辺
// radian = 底辺、斜辺間の角度(ラジアン)
var x = r * Math.cos(radian);
var y = r * Math.sin(radian);
var r = x / Math.cos(radian);
var r = y / Math.sin(radian);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment