Fix& operator = (const Fix& arg)
Assignment operator. If *this does not have its precision format set (i.e. it is uninitialized), the source Fix is copied. Otherwise, the source Fix value is converted to the existing precision. Either truncation or rounding takes place, based on the value of the rounding bit of the current object. Overflow results either in saturation, ”zero saturation” (replacing the result with zero), or a warning error message, depending on the overflow field of the object. In these cases, ovf_occurred will return TRUE on the result.
Fix& operator = (double arg)
Assignment operator. The double value is first converted to a default precision Fix number and then assigned to *this.
The function of these arithmetic operators should be self-explanatory:
Fix& operator += (const Fix&)
Fix& operator -= (const Fix&)
Fix& operator *= (const Fix&)
Fix& operator *= (int)
Fix& operator /= (const Fix&)
Fix operator + (const Fix&, const Fix&)
Fix operator - (const Fix&, const Fix&)
Fix operator * (const Fix&, const Fix&)
Fix operator * (const Fix&, int)
Fix operator * (int, const Fix&)
Fix operator / (const Fix&, const Fix&)
Fix operator - (const Fix&) // unary minus
int operator == (const Fix& a, const Fix& b)
int operator != (const Fix& a, const Fix& b)
int operator >= (const Fix& a, const Fix& b)
int operator <= (const Fix& a, const Fix& b)
int operator > (const Fix& a, const Fix& b)
int operator < (const Fix& a, const Fix& b)
Note: