rwlogo
HydraExpress 4.6

HydraExpress C++ API Reference Guide


   


Rogue Wave web site:  Home Page  |  Main Documentation Page

rwsf::DecimalBase Class Reference
[Core Numeric Types]

Provides enumerations used in the rwsf::Decimal class. More...

#include <rwsf/core/DecimalBase.h>

Inheritance diagram for rwsf::DecimalBase:
rwsf::Decimal

List of all members.

Public Types

enum  RoundingMethod {
  PLAIN, UP, DOWN, BANKERS,
  TRUNCATE
}

Detailed Description

This class provides enumerations used in the rwsf::Decimal class.


Member Enumeration Documentation

Sets the rounding method for the rwsf::Decimal::round() function. For all descriptions, the number to be rounded is split into the integer part (i.e., before decimal point) I and the fractional part (i.e., after decimal point) F.

Enumerator:
PLAIN 

If F < 0.5, round down to I. If F >= 0.5, round up to I + 1.

UP 

Round up to I + 1.

DOWN 

Round down to I.

BANKERS 

If F < 0.5, round down to I. If F > 0.5, round up to I + 1. If F = 0.5, and I is even, round down to I. If F = 0.5, and I is odd, round up to I+1.

TRUNCATE 

Round down to I (same as DOWN).


Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo are registered trademarks of Rogue Wave Software, and HydraExpress is a trademark of Rogue Wave Software. All other trademarks are the property of their respective owners.