[brlcad-commits] SF.net SVN: brlcad:[45476] brlcad/trunk
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <br...@us...> - 2011-07-14 04:21:58
|
Revision: 45476 http://brlcad.svn.sourceforge.net/brlcad/?rev=45476&view=rev Author: brlcad Date: 2011-07-14 04:21:52 +0000 (Thu, 14 Jul 2011) Log Message: ----------- remove nurb's MIN/MAX macros since we already rely on FMIN/FMAX elsewhere. Modified Paths: -------------- brlcad/trunk/include/nurb.h brlcad/trunk/src/librt/bezier_2d_isect.c brlcad/trunk/src/librt/primitives/bspline/nurb_flat.c Modified: brlcad/trunk/include/nurb.h =================================================================== --- brlcad/trunk/include/nurb.h 2011-07-14 04:18:22 UTC (rev 45475) +++ brlcad/trunk/include/nurb.h 2011-07-14 04:21:52 UTC (rev 45476) @@ -112,13 +112,6 @@ fastf_t * o_vec; }; -#if !defined(MAX) -# define MAX(i, j) ( (i) > (j) ? (i) : (j) ) -#endif -#if !defined(MIN) -# define MIN(i, j) ( (i) < (j) ? (i) : (j) ) -#endif - /* --- new way */ struct bezier_2d_list { Modified: brlcad/trunk/src/librt/bezier_2d_isect.c =================================================================== --- brlcad/trunk/src/librt/bezier_2d_isect.c 2011-07-14 04:18:22 UTC (rev 45475) +++ brlcad/trunk/src/librt/bezier_2d_isect.c 2011-07-14 04:21:52 UTC (rev 45476) @@ -132,10 +132,10 @@ max_distance_below = 0.0; for (i = 1; i < degree; i++) { if (distance[i] < 0.0) { - max_distance_below = MIN(max_distance_below, distance[i]); + max_distance_below = FMIN(max_distance_below, distance[i]); }; if (distance[i] > 0.0) { - max_distance_above = MAX(max_distance_above, distance[i]); + max_distance_above = FMAX(max_distance_above, distance[i]); } } bu_free((char *)distance, "ControlPolygonFlatEnough" ); @@ -171,8 +171,8 @@ } /* Compute intercepts of bounding box */ - left_intercept = MIN(intercept_1, intercept_2); - right_intercept = MAX(intercept_1, intercept_2); + left_intercept = FMIN(intercept_1, intercept_2); + right_intercept = FMAX(intercept_1, intercept_2); error = 0.5 * (right_intercept-left_intercept); Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_flat.c =================================================================== --- brlcad/trunk/src/librt/primitives/bspline/nurb_flat.c 2011-07-14 04:18:22 UTC (rev 45475) +++ brlcad/trunk/src/librt/primitives/bspline/nurb_flat.c 2011-07-14 04:21:52 UTC (rev 45476) @@ -87,7 +87,7 @@ rdist = rt_nurb_crv_flat(crv, srf->s_size[1], srf->pt_type); - max_row_dist = MAX(max_row_dist, rdist); + max_row_dist = FMAX(max_row_dist, rdist); } bu_free((char *)crv, "rt_nurb_s_flat: crv"); @@ -111,12 +111,12 @@ rdist = rt_nurb_crv_flat(crv, srf->s_size[0], srf->pt_type); - max_col_dist = MAX(max_col_dist, rdist); + max_col_dist = FMAX(max_col_dist, rdist); } bu_free((char *)crv, "rt_nurb_s_flat: crv"); - max_dist = MAX(max_row_dist, max_col_dist); + max_dist = FMAX(max_row_dist, max_col_dist); if (max_dist > epsilon) { if (max_row_dist > max_col_dist) @@ -254,7 +254,7 @@ VCROSS(xp, testv, ln); dist = MAGNITUDE(xp); - max_dist = MAX(max_dist, dist); + max_dist = FMAX(max_dist, dist); c_ptr += coords; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |