robotis_math_base.h
Go to the documentation of this file.
1 /*******************************************************************************
2 * Copyright 2018 ROBOTIS CO., LTD.
3 *
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
9 *
10 * Unless required by applicable law or agreed to in writing, software
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *******************************************************************************/
16
17 /*
18  * robotis_math_base.h
19  *
20  * Created on: June 7, 2016
21  * Author: SCH
22  */
23
24 #ifndef ROBOTIS_MATH_ROBOTIS_MATH_BASE_H_
25 #define ROBOTIS_MATH_ROBOTIS_MATH_BASE_H_
26
27 #include <iostream>
28 #include <cmath>
29
30 namespace robotis_framework
31 {
32
33 #define PRINT_VAR(X) std::cout << #X << " : " << X << std::endl
34 #define PRINT_MAT(X) std::cout << #X << ":\n" << X << std::endl << std::endl
35
36 #define DEGREE2RADIAN (M_PI / 180.0)
37 #define RADIAN2DEGREE (180.0 / M_PI)
38
39 inline double powDI(double a, int b)
40 {
41  return (b == 0 ? 1 : (b > 0 ? a * powDI(a, b - 1) : 1 / powDI(a, -b)));
42 }
43
44 double sign(double x);
45
46 int combination(int n, int r);
47
48 typedef struct
49 {
50  double x, y;
51 } Point2D;
52
53 }
54
55
56
57 #endif /* ROBOTIS_MATH_ROBOTIS_MATH_BASE_H_ */
double sign(double x)
int combination(int n, int r)
double powDI(double a, int b)

robotis_math
Author(s): SCH , Kayman , Jay Song
autogenerated on Fri Jul 17 2020 03:17:50