C++Builder Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
C++빌더 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
메신저 프로젝트
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
볼랜드포럼 광고 모집

C++빌더 Q&A
C++Builder Programming Q&A
[53370] Re:radian 이랑 degree
smleelms [smleelms] 1759 읽음    2008-05-07 19:07
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 );
: }

+ -

관련 글 리스트
53360 radian 이랑 degree 이성제 1249 2008/05/06
53370     Re:radian 이랑 degree smleelms 1759 2008/05/07
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.