userver: decimal64::DefRoundPolicy Class Reference
⚠️ This is the documentation for an old userver version. Click here to switch to the latest version.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
decimal64::DefRoundPolicy Class Referencefinal

Default rounding. Fast, rounds to nearest. More...

#include <userver/decimal64/decimal64.hpp>

Static Public Member Functions

template<typename T >
static constexpr int64_t Round (T value)
 
static constexpr int64_t DivRounded (int64_t a, int64_t b, bool)
 

Detailed Description

Default rounding. Fast, rounds to nearest.

On 0.5, rounds away from zero. Also, sometimes rounds up numbers in the neighborhood of 0.5, e.g. 0.49999999999999994 -> 1.

Definition at line 313 of file decimal64.hpp.

Member Function Documentation

◆ DivRounded()

static constexpr int64_t decimal64::DefRoundPolicy::DivRounded ( int64_t  a,
int64_t  b,
bool   
)
inlinestaticconstexpr

Definition at line 320 of file decimal64.hpp.

◆ Round()

template<typename T >
static constexpr int64_t decimal64::DefRoundPolicy::Round ( value)
inlinestaticconstexpr

Definition at line 316 of file decimal64.hpp.


The documentation for this class was generated from the following file: