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
81d11699
Commit
81d11699
authored
Jan 03, 2017
by
Joseph Mirabel
Committed by
Joseph Mirabel
Jan 03, 2017
Browse files
[Minor][C++] Fix random methods of JointModelPlanar
parent
d720c915
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/multibody/joint/joint-planar.hpp
View file @
81d11699
...
...
@@ -468,7 +468,7 @@ namespace se3
{
ConfigVector_t
result
;
result
.
head
<
2
>
().
setRandom
();
const
Scalar
angle
=
PI
*
(
(
Scalar
)(
-
1
+
2
*
rand
())
/
(
Scalar
)
RAND_MAX
);
const
Scalar
angle
=
PI
*
(
-
1
+
2
*
((
Scalar
)
rand
())
/
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
;
}
const
Scalar
angle
=
PI
*
(
(
Scalar
)(
-
1
+
2
*
rand
())
/
(
Scalar
)
RAND_MAX
);
const
Scalar
angle
=
PI
*
(
-
1
+
2
*
((
Scalar
)
rand
())
/
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