Changeset 450 in Sophya for trunk


Ignore:
Timestamp:
Oct 5, 1999, 12:14:13 AM (26 years ago)
Author:
ercodmgr
Message:

Protection contre NaN (finite()) Reza 4/10/99

Location:
trunk/SophyaPI/PI
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PI/pidrawer.cc

    r383 r450  
    44// LAL (Orsay) / IN2P3-CNRS  DAPNIA/SPP (Saclay) / CEA
    55
     6#include "machdefs.h"
     7#include <iostream.h>
    68#include "pidrawer.h"
    79#include <math.h>
     
    100102    else  ayud = kAxeDirDownUp;
    101103  }
    102   if (xmax <= xmin || ymax <= ymin)
    103     return; // $CHECK$ exception ?
     104  if (xmax <= xmin || ymax <= ymin) { 
     105    cerr << "PIDrawer::SetLimits() Error - xmax <= xmin  || ymax <= ymin ! " << endl;
     106    return;
     107    }
     108  if (!finite(xmin) || !finite(xmax) || !finite(ymin) || !finite(ymax)) {
     109    cerr << "PIDrawer::SetLimits() Error - Non finite value for x/ymin-max ! " << endl;
     110    return;
     111    }
    104112  if (axrl == kAxeDirLtoR)  aXdir = false;
    105113  else if (axrl == kAxeDirRtoL)  aXdir = true;
     
    131139//      Cette méthode doit calculer les limites (X/Y Min-Max) préferées par l'objet
    132140//      et doit appeler "SetLimits()". L'implementation par défaut ne fait rien.
    133 //  void  AppenTextInfo(string& info, double xmin, double ymin, double xmax, double ymax)
     141//  void  AppendTextInfo(string& info, double xmin, double ymin, double xmax, double ymax)
    134142//      Méthode qui met à jour la chaîne "info", avec les informations (textuelles) de
    135143//      la zone définie par "xmin-xmax" , "ymin-ymax".
  • trunk/SophyaPI/PI/pigraphuc.cc

    r387 r450  
    33// LAL (Orsay) / IN2P3-CNRS  DAPNIA/SPP (Saclay) / CEA
    44
     5#include "machdefs.h"
     6#include <iostream.h>
    57#include "pigraphuc.h"
    68
     
    132134  }
    133135
    134   if (xmax <= xmin  || ymax <= ymin)
    135     return; // $CHECK$ exception ?
     136  if (xmax <= xmin  || ymax <= ymin) {
     137    cerr << "PIGraphicUC::SetUCS() Error - xmax <= xmin  || ymax <= ymin ! " << endl;
     138    return;
     139    }
     140  if (!finite(xmin) || !finite(xmax) || !finite(ymin) || !finite(ymax)) {
     141    cerr << "PIGraphicUC::SetUCS() Error - Non finite value for x/ymin-max ! " << endl;
     142    return;
     143    }
    136144  if (axrl == kAxeDirLtoR)  aXdir = false;
    137145  else if (axrl == kAxeDirRtoL)  aXdir = true;
  • trunk/SophyaPI/PI/piscdrawwdg.cc

    r343 r450  
    22// Gestionnaire Drawer-2D  E.Aubourg, R. Ansari  96-98
    33// LAL (Orsay) / IN2P3-CNRS  DAPNIA/SPP (Saclay) / CEA
     4
     5#include "machdefs.h"
     6#include <iostream.h>
    47
    58#include "piscdrawwdg.h"
Note: See TracChangeset for help on using the changeset viewer.