From: teodor Date: Fri, 21 Jan 2005 17:56:06 +0000 (+0000) Subject: isfinite -> finite X-Git-Url: http://sigaev.ru/git/gitweb.cgi?a=commitdiff_plain;h=08610ffa16ade4d91b62d4ac2318e58573cc128e;p=xgalaxy.git isfinite -> finite --- diff --git a/galaxy.c b/galaxy.c index 1db3522..614d8b4 100644 --- a/galaxy.c +++ b/galaxy.c @@ -356,7 +356,7 @@ EnergyImpulseGalaxy(Galaxy *galaxy) { galaxy->Impulse = sqrt(impulseX*impulseX + impulseY*impulseY + impulseZ*impulseZ); galaxy->Moment = sqrt(momentX *momentX + momentY *momentY + momentZ *momentZ ); galaxy->kineticEnergy = kinetic; - if ( !isfinite(potential) ) potential=0; + if ( !finite(potential) ) potential=0; galaxy->potentialEnergy = -potential; } @@ -378,9 +378,9 @@ initLiveGalaxy(Galaxy *galaxy) { #define iszero(x) ( fpclassify(x) & FP_ZERO ) #define CHK_ERRORVAL( what, err, val, prevval ) \ -if ( isfinite(val) && isfinite(prevval) ) { \ +if ( finite(val) && finite(prevval) ) { \ err = fabs( (val)/(prevval) - 1.0 ); \ - if ( !isfinite(err) ) \ + if ( !finite(err) ) \ err = galaxy->error; \ } else { \ fprintf(stderr, "%s is not finite: val:%G prevval:%G\n", what, (val), (prevval)); \ diff --git a/menuaction.c b/menuaction.c index f9600ef..d461fbf 100644 --- a/menuaction.c +++ b/menuaction.c @@ -464,7 +464,7 @@ actionRun( GtkWidget *w, gpointer data ) { } for(i=0;i