Commit fb8acf2f authored by Florent Lamiraux's avatar Florent Lamiraux Committed by Florent Lamiraux florent@laas.fr
Browse files

Improve initialization of nan vector.

parent c91a420e
......@@ -348,7 +348,7 @@ public:
std::numeric_limits<FCL_REAL>::max()):
min_distance(min_distance_), o1(NULL), o2(NULL), b1(NONE), b2(NONE)
{
Vec3f nan; nan << sqrt (-1), sqrt (-1), sqrt (-1);
Vec3f nan (Vec3f::Constant(std::numeric_limits<FCL_REAL>::quiet_NaN()));
nearest_points [0] = nearest_points [1] = normal = nan;
}
......
......@@ -351,7 +351,8 @@ namespace fcl {
assert (radius >= 0);
Vec3f p1_to_center = center - P1;
FCL_REAL distance_from_plane = p1_to_center.dot(normal);
Vec3f closest_point; closest_point << sqrt (-1), sqrt (-1), sqrt (-1);
Vec3f closest_point
(Vec3f::Constant(std::numeric_limits<FCL_REAL>::quiet_NaN()));
FCL_REAL min_distance_sqr, distance_sqr;
if(distance_from_plane < 0) {
......
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