Tags
- postman
- postman automations
- LSL_Script
- 프런트엔드
- postman csv
- Front-end developer
- C++
- Android
- 우수한 프런트 개발자
- oracle
- Android/iOS Developer
- Interaction developer
- Java
- postman tests
- solidity
- MFC
- UI/UX Engineer
- Intellij
- postman collection variables
- Unity
- postman excel
- c#
- postman collection
- web developer
- 좋은 개발자
- postman session
- postman html parse
- emplace_back
- 다빈치 리졸브
- postman pre-request
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Archives
- Today
- Total
david's daily developer note
C# 두 벡터 내적 계산. 본문
728x90
두 벡터 (1, 0) , (0, 1)이 있다고 할 때, 아래의 벡터 특성으로~ 두 벡터간의 내적을 구할 수 있다.
다음은 위 수식을 C#으로 구현한 코드이다.
Vector v1 = new Vector(0, 1);
Vector v2 = new Vector(1, 0);
double leftExpression = v1.X * v2.X + v1.Y * v2.Y;
double theta = leftExpression /
( Math.Sqrt(Math.Pow(v1.X, 2) + Math.Pow(v1.Y, 2)) * Math.Sqrt(Math.Pow(v2.X, 2) + Math.Pow(v2.Y, 2)) );
double innerD = (double)(Math.Acos(theta) * (180 / Math.PI));
결괏값 90 잘나온당
728x90