blob: 6a55a57480ab4d5a2030a253ab31c8fc212eae06 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
// -*- C++ -*-
// $Id$
namespace ACE_OS {
ACE_INLINE double
floor (double x)
{
// This method computes the largest integral value not greater than x.
return double (static_cast<long> (x));
}
ACE_INLINE double
ceil (double x)
{
// This method computes the smallest integral value not less than x.
const double floor = ACE_OS::floor (x);
if (floor == x)
return floor;
else
return floor + 1;
}
} // ACE_OS namespace
|