Advertisement
mrpowhs

Untitled

Feb 9th, 2014
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.23 KB | None | 0 0
  1. // Távolság a megadott vektortól
  2.     inline T distance(const Vec3& other) const
  3.     {
  4.         T x = other.v[0]-v[0];
  5.         T y = other.v[1]-v[1];
  6.         T z = other.v[2]-v[2];
  7.         return std::sqrt(x*x + y*y + z*z);
  8.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement