最近three.jsで遊ぶことが多いんですが、
入力する角度がラジアン値のようなので、
数学に不慣れな身としてはこれがいちいちちょっとめんどくさい。
円周率や三角関数と違い
Mathにラジアン変換が用意されていなかったので
関数を使うことにしました。
以下メモ。
var toRadian = function(degrees) {
return degrees * Math.PI / 180;
};
Go to list of users who liked
More than 5 years have passed since last update.
最近three.jsで遊ぶことが多いんですが、
入力する角度がラジアン値のようなので、
数学に不慣れな身としてはこれがいちいちちょっとめんどくさい。
円周率や三角関数と違い
Mathにラジアン変換が用意されていなかったので
関数を使うことにしました。
以下メモ。
var toRadian = function(degrees) {
return degrees * Math.PI / 180;
};
Register as a new user and use Qiita more conveniently
Go to list of users who liked