Advertisement
mrpowhs

Untitled

Feb 9th, 2014
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.26 KB | None | 0 0
  1. /// OSZÁLYON KÍVÜL
  2.  
  3. // Cross product
  4. template <class T>
  5. inline Vec3<T> cross(const Vec3<T>& a, const Vec3<T>& b)
  6. {
  7.     return Vec3<T>(a.y()*b.z() - a.z()*b.y(),
  8.                 a.z()*b.x() - a.x()*b.z(),
  9.                 a.x()*b.y() - a.y()*b.x());
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement