HydraExpress™ C++ API Reference Guide

 
Loading...
Searching...
No Matches
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

◆ RoundingMethod

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 © 2026 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.