プログラムdeタマゴ

nodamushiの著作物は、文章、画像、プログラムにかかわらず全てUnlicenseです

2014-07-06から1日間の記事一覧

-Π≦θ<Πに納める

いったい計算するの何回目だよ、いい加減覚えろよということで、メモ //-Π≦θ<Πに納める場合 theta1 = theta - 2*PI*( 1 + floor( theta/(2*PI) - 0.5) ); //-Π<θ≦Πに納める場合 theta2 = theta - 2*PI*ceil( theta/(2*PI) - 0.5); //おまけ。-1〜1の場合 y…