~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/math/round.cc

  • Committer: Vijay Samuel
  • Date: 2010-08-04 17:46:49 UTC
  • mto: (1685.1.7 build)
  • mto: This revision was merged to the branch mainline in revision 1688.
  • Revision ID: vijay@vijay-20100804174649-ed61v9usifb9zujc
Merge refactored command line for tests/resolve_stack_dump`

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
#include <algorithm>
27
27
 
28
28
#include "drizzled/function/math/round.h"
29
 
#include "drizzled/util/test.h"
30
29
 
31
30
namespace drizzled
32
31
{
203
202
 
204
203
  if (truncate)
205
204
    value= (unsigned_flag) ?
206
 
      (int64_t)(((uint64_t) value / tmp) * tmp) : (value / tmp) * tmp;
 
205
      ((uint64_t) value / tmp) * tmp : (value / tmp) * tmp;
207
206
  else
208
207
    value= (unsigned_flag || value >= 0) ?
209
 
      (int64_t)(my_unsigned_round((uint64_t) value, tmp)) :
 
208
      my_unsigned_round((uint64_t) value, tmp) :
210
209
      -(int64_t) my_unsigned_round((uint64_t) -value, tmp);
211
210
  return value;
212
211
}