SRVector3DAddons.h
Go to the documentation of this file.
1 
2  // Extra utility functions from SRVector3DAddons.h
3 
4  float X() const {return x;}
5  float Y() const {return y;}
6  float Z() const {return z;}
7 
8  operator TVector3() const {return TVector3(x, y, z);}
9 
10  float Mag2() const {return x*x+y*y+z*z;}
11  float Mag() const {return sqrt(Mag2());}
12  float Dot(const Proxy& v) const {return x*v.x + y*v.y + z*v.z;}
13  float Dot(const TVector3& v) const {return x*v.X() + y*v.Y() + z*v.Z();}
14  TVector3 Unit() const
15  {
16  const float m = Mag();
17  return TVector3(x/m, y/m, z/m);
18  }
float Dot(const Proxy &v) const
T sqrt(T number)
Definition: d0nt_math.hpp:156
float X() const
float Z() const
float Mag() const
TVector3 Unit() const
z
Definition: test.py:28
float Mag2() const
float Y() const