4
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

度をもとにラジアンを返す

Last updated at Posted at 2014-12-01

最近three.jsで遊ぶことが多いんですが、
入力する角度がラジアン値のようなので、
数学に不慣れな身としてはこれがいちいちちょっとめんどくさい。

円周率や三角関数と違い
Mathにラジアン変換が用意されていなかったので
関数を使うことにしました。

以下メモ。

var toRadian = function(degrees) {
  return degrees * Math.PI / 180;
};
4
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?