Skip to content

Commit

Permalink
add a negation operator to fixedf
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbartholomew committed May 5, 2012
1 parent 84968ff commit 3003356
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/fixed.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class fixedf {
fixedf &operator>>=(const int a) { v >>= a; return (*this); }
fixedf &operator<<=(const int a) { v <<= a; return (*this); }

friend fixedf operator-(const fixedf a) { return fixedf(-a.v); }
friend fixedf operator+(const fixedf a, const fixedf b) { return fixedf(a.v+b.v); }
friend fixedf operator-(const fixedf a, const fixedf b) { return fixedf(a.v-b.v); }
friend fixedf operator*(const fixedf a, const fixedf b) {
Expand Down

0 comments on commit 3003356

Please sign in to comment.