HydraExpress™ C++ API Reference Guide

Product Documentation:
   HydraExpress C++
Documentation Home
List of all members | Public Types
rwsf::DecimalBase Class Reference

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

#include <rwsf/core/DecimalBase.h>

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

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 © 2020 Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is registered trademark of Rogue Wave Software, Inc. in the United States and other countries, and HydraExpress is a trademark of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.