rotate(), radians

2026. 4. 21. 18:34Godat

 

튜토리얼중 rotate() 관련 항목에서 radian에 대한 설명

 

What are radians?

The value of 0.3 is an angle in radians. In daily life, we're used to measuring angles in degrees. The radian is another scale commonly used in video games and math.
You can convert radians into degrees by multiplying them by 180 and dividing them by PI:
degrees = radians * 180 / PI
An angle of PI radians corresponds to 180 degrees. And 2 * PI is a full turn: 360 degrees.
How do radians work exactly?
Radians are a way to measure angles based on the radius of a circle.
To get the angle in radians, you take the circle's radius and wrap it around the circle. That angle is 1 radian because you are wrapping the radius 1 time around the circle.


Because the perimeter of a circle is 2 * PI * radius, a full turn (360°) corresponds to 2 * PI radians: you need to wrap the radius of a circle 2 * PI times around the circle to make a full circle.

 

godot의 rotate() 에서는 기본적으로 radian 호도법을 사용

 

 

이후 튜토리얼에서 나온 turn_right() 같은경우 degree 호도법 사용 ( 90 입력시 90도 우회전)

(튜토리얼용 fucntion)

728x90