I\'m implementing vector class and I need to get an opposite of some vector. Is it possible to define this method using operator overloading?
Here\'s what I mean:
It's
Vector2f operator-(const Vector2f& in) { return Vector2f(-in.x,-in.y); }
Can be within the class, or outside. My sample is in namespace scope.