三角関数を使う理由は、波を出したいとき。
ゆっくり上がって下がるという処理をIF文で作ることはできますが、
三角関数の使い方を知っていたら、一行で作ることができます。
あと、ぐるぐる回る動きも三角関数で作れますね。
The reason for using trigonometric functions is to create wave-like motion.
You can implement a gradual rise and fall using if statements, but if you understand how to use trigonometric functions, you can achieve it in a single line of code.
They can also be used to create circular motion.
Deyashiki Programming School
次回
