Skip to content

Commit 2ce1ce9

Browse files
committed
define PI_2
1 parent dacbbdf commit 2ce1ce9

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

roboticstoolbox/core/linalg.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,9 @@ extern "C"
150150
else
151151
{
152152
// a = np.pi / 2 * (np.diag(R) + 1);
153-
e[3] = M_PI_2 * (R[0] + 1);
154-
e[4] = M_PI_2 * (R[4] + 1);
155-
e[5] = M_PI_2 * (R[8] + 1);
153+
e[3] = PI_2 * (R[0] + 1);
154+
e[4] = PI_2 * (R[4] + 1);
155+
e[5] = PI_2 * (R[8] + 1);
156156
}
157157
}
158158
else

roboticstoolbox/core/linalg.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ extern "C"
1515
{
1616
#endif /* __cplusplus */
1717

18+
#define PI_2 1.57079632679489661923132169163975144
19+
1820
#define Matrix4dc Eigen::Matrix4d
1921
#define Matrix4dr Eigen::Matrix<double, 4, 4, Eigen::RowMajor>
2022

0 commit comments

Comments
 (0)