From: John L. <jla...@gm...> - 2008-10-27 01:11:22
|
On Sat, Oct 25, 2008 at 7:49 AM, klaas.holwerda <ng...@kl...> wrote: > John Labenski wrote: >> I think the latter makes more sense since you're writing that the == >> operator should be applied between the class object instance and "b". >> I've never understood why operators are often written outside the >> class. >> > It is for cases like this, where the first argument is not a matrix. > > friend bool operator== ( double a, const a2dAffineMatrix& b ); > > But i think i don't use that type, so i switch to the short notation. That is probably best since, we can't add functions to the number so we'd have to invent a whole new set of operators for the left hand side operators. -John |