|
math.hpp 에 함수가 정의되어 있습니다. 참고하시기 바랍니다.
Converts radians to degrees.
Extended RadToDeg(const Extended Radians);
Use RadToDeg to convert angles measured in radians to degrees, where
degrees = radians(180/pi).
----
Returns the value of a degree measurement expressed in radians.
Extended DegToRad(const Extended Degrees);
Use DegToRad to convert angles expressed in degrees to the corresponding value in radians, where
radians = degrees(pi/180).
이성제 님이 쓰신 글 :
: 각도 계산을 했는게 계속 radian으로 나오네요...
:
: 어떻게 degree로 바꿀 수 없나여?
:
: float Guri(int A[2], int B[2]) // 두 점 사이의 길이
: {
: return sqrt(pow(A[0]-B[0], 2)+pow(A[1]-B[1], 2));
: }
: float GetDegree(int A[2], int B[2])
: {
: int C[2] = {B[0], A[1]};
: float AC = Guri(A, C), AB = Guri(A, B), BC = Guri(B, C);
:
: if ( AC == 0 || AB == 0 ) return 0;
:
: return atan( BC / AC );
: }
|