Commit 81d11699 authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

[Minor][C++] Fix random methods of JointModelPlanar

parent d720c915
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment