With a couple of parenthesis no need any more for NOMINMAX

This commit is contained in:
Paolo Cignoni 2011-03-25 10:37:07 +00:00
parent 0d98d0216e
commit 646cfe482d
2 changed files with 6 additions and 6 deletions

View File

@ -333,12 +333,12 @@ void PathMode::Init(const std::vector < Point3f > &pts)
for(unsigned int i=1;i<npts;i++){
seg_length=Distance(points[i-1],points[i]);
path_length += seg_length;
min_seg_length = std::min(seg_length,min_seg_length);
min_seg_length = (std::min)(seg_length,min_seg_length);
}
if(wrap){
seg_length=Distance(points[npts-1],points[0]);
path_length += seg_length;
min_seg_length = std::min(seg_length,min_seg_length);
min_seg_length = (std::min)(seg_length,min_seg_length);
}
}
@ -616,7 +616,7 @@ void AreaMode::Init(const std::vector < Point3f > &pts)
}
min_side_length=Distance(points[0],points[1]);
for(unsigned int i=1;i<npts;i++){
min_side_length=std::min(Distance(points[i-1],points[i]),min_side_length);
min_side_length=(std::min)(Distance(points[i-1],points[i]),min_side_length);
}
rubberband_handle=old_status=status=initial_status=p0;
}

View File

@ -752,9 +752,9 @@ void DrawUglyLetter(Trackball * tb,std::vector<Point3f> ugly_letter)
{
Point3f center=tb->camera.Project(tb->center);
float offset=0;
offset=std::max(offset,Distance(center,tb->camera.Project(tb->center+(Point3f(1,0,0) * tb->radius))));
offset=std::max(offset,Distance(center,tb->camera.Project(tb->center+(Point3f(0,1,0) * tb->radius))));
offset=std::max(offset,Distance(center,tb->camera.Project(tb->center+(Point3f(0,0,1) * tb->radius))));
offset=(std::max)(offset,Distance(center,tb->camera.Project(tb->center+(Point3f(1,0,0) * tb->radius))));
offset=(std::max)(offset,Distance(center,tb->camera.Project(tb->center+(Point3f(0,1,0) * tb->radius))));
offset=(std::max)(offset,Distance(center,tb->camera.Project(tb->center+(Point3f(0,0,1) * tb->radius))));
glPushMatrix();
glPushAttrib (GL_ALL_ATTRIB_BITS);
// go to world coords