Selaa lähdekoodia

switch floor to cfloor

cxgeorge 24 vuotta sitten
vanhempi
sitoutus
b40105460d
2 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. 1 1
      direct/src/dcparser/dcAtomicField.cxx
  2. 1 0
      direct/src/dcparser/dcAtomicField.h

+ 1 - 1
direct/src/dcparser/dcAtomicField.cxx

@@ -240,7 +240,7 @@ end_array() {
 bool DCAtomicField::ElementType::
 format_default_value(double num, string &formatted) const {
   double real_value = num * _divisor;
-  int int_value = (int)floor(real_value + 0.5);
+  int int_value = (int)cfloor(real_value + 0.5);
 
   switch (_type) {
   case ST_int8:

+ 1 - 0
direct/src/dcparser/dcAtomicField.h

@@ -19,6 +19,7 @@
 #ifndef DCATOMICFIELD_H
 #define DCATOMICFIELD_H
 
+#include <cmath.h>
 #include "dcbase.h"
 #include "dcField.h"
 #include "dcSubatomicType.h"