/*
* curve.c++
*
- * $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $
- * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/curve.cc,v 1.1 2001/03/17 00:25:40 brianp Exp $
+ * $Date: 2001/08/13 16:52:18 $ $Revision: 1.2 $
+ * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/curve.cc,v 1.2 2001/08/13 16:52:18 brianp Exp $
*/
#include "glimports.h"
REAL t = mapdesc->getProperty( N_PIXEL_TOLERANCE );
if( mapdesc->isParametricDistanceSampling() ) {
REAL d = mapdesc->calcPartialVelocity( &tmp[0][0], tstride, order, 2, range[2] );
- stepsize = (d > 0.0) ? ::sqrtf( 8.0 * t / d ) : range[2];
+ stepsize = (d > 0.0) ? sqrtf( 8.0 * t / d ) : range[2];
minstepsize = ( mapdesc->maxrate > 0.0 ) ? (range[2] / mapdesc->maxrate) : 0.0;
} else if( mapdesc->isPathLengthSampling() ) {
// t is upper bound on path (arc) length
/*
* mapdescv.c++
*
- * $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $
- * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/mapdescv.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $
+ * $Date: 2001/08/13 16:52:18 $ $Revision: 1.2 $
+ * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/mapdescv.cc,v 1.2 2001/08/13 16:52:18 brianp Exp $
*/
#include "glimports.h"
REAL max = 0.0;
for( j=0; j != ncols-partial; j++ )
if( mag[j] > max ) max = mag[j];
- max = fac * ::sqrtf( (float) max );
+ max = fac * sqrtf( (float) max );
return max;
}
j = ncols-tpartial-1;
if( mag[i][j] > dist[1] ) dist[1] = mag[i][j];
}
- dist[0] = fac * ::sqrtf( dist[0] );
- dist[1] = fac * ::sqrtf( dist[1] );
+ dist[0] = fac * sqrtf( dist[0] );
+ dist[1] = fac * sqrtf( dist[1] );
} else if( side == 1 ) {
// compute max magnitude of first and last row
dist[0] = 0.0;
i = nrows-spartial-1;
if( mag[i][j] > dist[1] ) dist[1] = mag[i][j];
}
- dist[0] = fac * ::sqrtf( dist[0] );
- dist[1] = fac * ::sqrtf( dist[1] );
+ dist[0] = fac * sqrtf( dist[0] );
+ dist[1] = fac * sqrtf( dist[1] );
}
- max = fac * ::sqrtf( (float) max );
+ max = fac * sqrtf( (float) max );
return max;
}
/*
* patch.c++
*
- * $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $
- * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/patch.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $
+ * $Date: 2001/08/13 16:52:18 $ $Revision: 1.2 $
+ * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/patch.cc,v 1.2 2001/08/13 16:52:18 brianp Exp $
*/
#include <stdio.h>
if( ss != 0.0 && tt != 0.0 ) {
/* printf( "ssv[0] %g ssv[1] %g ttv[0] %g ttv[1] %g\n",
ssv[0], ssv[1], ttv[0], ttv[1] ); */
- REAL ttq = ::sqrtf( (float) ss );
- REAL ssq = ::sqrtf( (float) tt );
- REAL ds = ::sqrtf( 4 * t2 * ttq / ( ss * ttq + st * ssq ) );
- REAL dt = ::sqrtf( 4 * t2 * ssq / ( tt * ssq + st * ttq ) );
+ REAL ttq = sqrtf( (float) ss );
+ REAL ssq = sqrtf( (float) tt );
+ REAL ds = sqrtf( 4 * t2 * ttq / ( ss * ttq + st * ssq ) );
+ REAL dt = sqrtf( 4 * t2 * ssq / ( tt * ssq + st * ttq ) );
pspec[0].stepsize = ( ds < pspec[0].range[2] ) ? ds : pspec[0].range[2];
REAL scutoff = 2.0 * t2 / ( pspec[0].range[2] * pspec[0].range[2]);
- pspec[0].sidestep[0] = (ssv[0] > scutoff) ? ::sqrtf( 2.0 * t2 / ssv[0] ) : pspec[0].range[2];
- pspec[0].sidestep[1] = (ssv[1] > scutoff) ? ::sqrtf( 2.0 * t2 / ssv[1] ) : pspec[0].range[2];
+ pspec[0].sidestep[0] = (ssv[0] > scutoff) ? sqrtf( 2.0 * t2 / ssv[0] ) : pspec[0].range[2];
+ pspec[0].sidestep[1] = (ssv[1] > scutoff) ? sqrtf( 2.0 * t2 / ssv[1] ) : pspec[0].range[2];
pspec[1].stepsize = ( dt < pspec[1].range[2] ) ? dt : pspec[1].range[2];
REAL tcutoff = 2.0 * t2 / ( pspec[1].range[2] * pspec[1].range[2]);
- pspec[1].sidestep[0] = (ttv[0] > tcutoff) ? ::sqrtf( 2.0 * t2 / ttv[0] ) : pspec[1].range[2];
- pspec[1].sidestep[1] = (ttv[1] > tcutoff) ? ::sqrtf( 2.0 * t2 / ttv[1] ) : pspec[1].range[2];
+ pspec[1].sidestep[0] = (ttv[0] > tcutoff) ? sqrtf( 2.0 * t2 / ttv[0] ) : pspec[1].range[2];
+ pspec[1].sidestep[1] = (ttv[1] > tcutoff) ? sqrtf( 2.0 * t2 / ttv[1] ) : pspec[1].range[2];
} else if( ss != 0.0 ) {
REAL x = pspec[1].range[2] * st;
- REAL ds = ( ::sqrtf( x * x + 8.0 * t2 * ss ) - x ) / ss;
+ REAL ds = ( sqrtf( x * x + 8.0 * t2 * ss ) - x ) / ss;
pspec[0].stepsize = ( ds < pspec[0].range[2] ) ? ds : pspec[0].range[2];
REAL scutoff = 2.0 * t2 / ( pspec[0].range[2] * pspec[0].range[2]);
- pspec[0].sidestep[0] = (ssv[0] > scutoff) ? ::sqrtf( 2.0 * t2 / ssv[0] ) : pspec[0].range[2];
- pspec[0].sidestep[1] = (ssv[1] > scutoff) ? ::sqrtf( 2.0 * t2 / ssv[1] ) : pspec[0].range[2];
+ pspec[0].sidestep[0] = (ssv[0] > scutoff) ? sqrtf( 2.0 * t2 / ssv[0] ) : pspec[0].range[2];
+ pspec[0].sidestep[1] = (ssv[1] > scutoff) ? sqrtf( 2.0 * t2 / ssv[1] ) : pspec[0].range[2];
pspec[1].singleStep();
} else if( tt != 0.0 ) {
REAL x = pspec[0].range[2] * st;
- REAL dt = ( ::sqrtf( x * x + 8.0 * t2 * tt ) - x ) / tt;
+ REAL dt = ( sqrtf( x * x + 8.0 * t2 * tt ) - x ) / tt;
pspec[0].singleStep();
REAL tcutoff = 2.0 * t2 / ( pspec[1].range[2] * pspec[1].range[2]);
pspec[1].stepsize = ( dt < pspec[1].range[2] ) ? dt : pspec[1].range[2];
- pspec[1].sidestep[0] = (ttv[0] > tcutoff) ? ::sqrtf( 2.0 * t2 / ttv[0] ) : pspec[1].range[2];
- pspec[1].sidestep[1] = (ttv[1] > tcutoff) ? ::sqrtf( 2.0 * t2 / ttv[1] ) : pspec[1].range[2];
+ pspec[1].sidestep[0] = (ttv[0] > tcutoff) ? sqrtf( 2.0 * t2 / ttv[0] ) : pspec[1].range[2];
+ pspec[1].sidestep[1] = (ttv[1] > tcutoff) ? sqrtf( 2.0 * t2 / ttv[1] ) : pspec[1].range[2];
} else {
if( 4.0 * t2 > st * pspec[0].range[2] * pspec[1].range[2] ) {
pspec[0].singleStep();
pspec[1].singleStep();
} else {
REAL area = 4.0 * t2 / st;
- REAL ds = ::sqrtf( area * pspec[0].range[2] / pspec[1].range[2] );
- REAL dt = ::sqrtf( area * pspec[1].range[2] / pspec[0].range[2] );
+ REAL ds = sqrtf( area * pspec[0].range[2] / pspec[1].range[2] );
+ REAL dt = sqrtf( area * pspec[1].range[2] / pspec[0].range[2] );
pspec[0].stepsize = ( ds < pspec[0].range[2] ) ? ds : pspec[0].range[2];
pspec[0].sidestep[0] = pspec[0].range[2];
pspec[0].sidestep[1] = pspec[0].range[2];
if( ms != 0.0 && mt != 0.0 ) {
REAL d = 1.0 / (ms * mt);
t *= M_SQRT2;
- REAL ds = t * ::sqrtf( d * pspec[0].range[2] / pspec[1].range[2] );
- REAL dt = t * ::sqrtf( d * pspec[1].range[2] / pspec[0].range[2] );
+ REAL ds = t * sqrtf( d * pspec[0].range[2] / pspec[1].range[2] );
+ REAL dt = t * sqrtf( d * pspec[1].range[2] / pspec[0].range[2] );
pspec[0].stepsize = ( ds < pspec[0].range[2] ) ? ds : pspec[0].range[2];
pspec[0].sidestep[0] = ( msv[0] * pspec[0].range[2] > t ) ? (t / msv[0]) : pspec[0].range[2];
pspec[0].sidestep[1] = ( msv[1] * pspec[0].range[2] > t ) ? (t / msv[1]) : pspec[0].range[2];