Advertisement
mrpowhs

Untitled

Feb 9th, 2014
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.49 KB | None | 0 0
  1. // Összeadás
  2.     inline void operator+= (const Vec3& other)
  3.     {v[0]+=other.v[0]; v[1]+=other.v[1]; v[2]+=other.v[2];}
  4.     inline Vec3 operator+ (const Vec3& other) const
  5.     {return Vec3(v[0]+other.v[0], v[1]+other.v[1], v[2]+other.v[2]);}
  6.  
  7.     // Kivonás
  8.     inline void operator-= (const Vec3& other)
  9.     {v[0]-=other.v[0]; v[1]-=other.v[1]; v[2]-=other.v[2];}
  10.     inline Vec3 operator- (const Vec3& other) const
  11.     {return Vec3(v[0]-other.v[0], v[1]-other.v[1], v[2]-other.v[2]);}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement