Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guilhem Saurel
pinocchio
Commits
14dac0e4
Commit
14dac0e4
authored
Jan 03, 2017
by
Joseph Mirabel
Committed by
Joseph Mirabel
Jan 03, 2017
Browse files
[Minor][C++] Add missing cast and clean code.
parent
a445d9e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/multibody/joint/joint-planar.hpp
View file @
14dac0e4
...
...
@@ -466,9 +466,9 @@ namespace se3
ConfigVector_t
random_impl
()
const
{
Scalar
angle
=
PI
*
(
-
1
+
2
*
rand
()
/
RAND_MAX
);
ConfigVector_t
result
;
result
.
head
<
2
>
()
=
Eigen
::
Matrix
<
Scalar
,
2
,
1
>::
Random
();
result
.
head
<
2
>
().
setRandom
();
const
Scalar
angle
=
PI
*
((
Scalar
)(
-
1
+
2
*
rand
())
/
(
Scalar
)
RAND_MAX
);
SINCOS
(
angle
,
&
result
[
3
],
&
result
[
2
]);
return
result
;
}
...
...
@@ -488,7 +488,7 @@ namespace se3
}
result
[
i
]
=
lower_pos_limit
[
i
]
+
(
upper_pos_limit
[
i
]
-
lower_pos_limit
[
i
])
*
rand
()
/
RAND_MAX
;
}
Scalar
angle
=
PI
*
(
-
1
+
2
*
rand
()
/
RAND_MAX
);
const
Scalar
angle
=
PI
*
((
Scalar
)
(
-
1
+
2
*
rand
()
)
/
(
Scalar
)
RAND_MAX
);
SINCOS
(
angle
,
&
result
[
3
],
&
result
[
2
]);
return
result
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment