dbertoni    2003/01/03 00:01:29

  Modified:    c/src/PlatformSupport DoubleSupport.hpp
  Log:
  New math functions.
  
  Revision  Changes    Path
  1.16      +35 -0     xml-xalan/c/src/PlatformSupport/DoubleSupport.hpp
  
  Index: DoubleSupport.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/DoubleSupport.hpp,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- DoubleSupport.hpp 20 Nov 2002 02:27:13 -0000      1.15
  +++ DoubleSupport.hpp 3 Jan 2003 08:01:29 -0000       1.16
  @@ -64,6 +64,7 @@
   
   
   
  +#include <cmath>
   #include <functional>
   
   
  @@ -606,6 +607,40 @@
         */
        static double
        round(double    theValue);
  +
  +     /**
  +      * Returns the ceiling of a number according to the XPath
  +      * rules.
  +      *
  +      * @param theValue The value to round.
  +      * @return The result of the rounding
  +      */
  +     static double
  +     ceiling(double  theValue)
  +     {
  +#if defined(XALAN_STRICT_ANSI_HEADERS)
  +             return std::ceil(theValue);
  +#else
  +             return ceil(theValue);
  +#endif
  +     }
  +
  +     /**
  +      * Returns the floor of a number according to the XPath
  +      * rules.
  +      *
  +      * @param theValue The value to round.
  +      * @return The result of the rounding
  +      */
  +     static double
  +     floor(double    theValue)
  +     {
  +#if defined(XALAN_STRICT_ANSI_HEADERS)
  +             return std::floor(theValue);
  +#else
  +             return ::floor(theValue);
  +#endif
  +     }
   
        typedef const unsigned int*                                             
DWORDPointerType;
        typedef XALAN_UNALIGNED const unsigned int*             
UnalignedDWORDPointerType;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to