GnuCash c935c2f+
Loading...
Searching...
No Matches
Modules | Data Structures | Functions | Variables
Gnc_numeric_mutators

These are the standard mutating operators. More...

Modules

 Gnc_numeric_comparison
 Compare function.
 

Functions

void GncNumeric::operator+= (GncNumeric b)
 
void GncNumeric::operator-= (GncNumeric b)
 
void GncNumeric::operator*= (GncNumeric b)
 
void GncNumeric::operator/= (GncNumeric b)
 

Variables

int64_t GncNumeric::round_param::num
 
int64_t GncNumeric::round_param::den
 
int64_t GncNumeric::round_param::rem
 

Detailed Description

These are the standard mutating operators.

They use GncRational's operators and then call the GncRational constructor, which will silently round half-down.

Function Documentation

◆ operator*=()

void GncNumeric::operator*= ( GncNumeric  b)

Definition at line 595 of file gnc-numeric.cpp.

596{
597 *this = *this * b;
598}

◆ operator+=()

void GncNumeric::operator+= ( GncNumeric  b)

Definition at line 583 of file gnc-numeric.cpp.

584{
585 *this = *this + b;
586}

◆ operator-=()

void GncNumeric::operator-= ( GncNumeric  b)

Definition at line 589 of file gnc-numeric.cpp.

590{
591 *this = *this - b;
592}

◆ operator/=()

void GncNumeric::operator/= ( GncNumeric  b)

Definition at line 601 of file gnc-numeric.cpp.

602{
603 *this = *this / b;
604}

Variable Documentation

◆ den

int64_t GncNumeric::round_param::den

Definition at line 272 of file gnc-numeric.hpp.

◆ num

int64_t GncNumeric::round_param::num

Definition at line 271 of file gnc-numeric.hpp.

◆ rem

int64_t GncNumeric::round_param::rem

Definition at line 273 of file gnc-numeric.hpp.