GnuCash c935c2f+
Loading...
Searching...
No Matches
Functions
Gnc_rational_mutators

Standard mutating arithmetic operators. More...

Functions

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

Detailed Description

Standard mutating arithmetic operators.

Function Documentation

◆ operator*=()

void GncRational::operator*= ( GncRational  b)

Definition at line 118 of file gnc-rational.cpp.

119{
120 GncRational new_val = *this * b;
121 *this = std::move(new_val);
122}
Rational number class using GncInt128 for the numerator and denominator.

◆ operator+=()

void GncRational::operator+= ( GncRational  b)

Definition at line 104 of file gnc-rational.cpp.

105{
106 GncRational new_val = *this + b;
107 *this = std::move(new_val);
108}

◆ operator-=()

void GncRational::operator-= ( GncRational  b)

Definition at line 111 of file gnc-rational.cpp.

112{
113 GncRational new_val = *this - b;
114 *this = std::move(new_val);
115}

◆ operator/=()

void GncRational::operator/= ( GncRational  b)

Definition at line 125 of file gnc-rational.cpp.

126{
127 GncRational new_val = *this / b;
128 *this = std::move(new_val);
129}