1 #ifndef MSP_LINAL_VECTOR3_H_
2 #define MSP_LINAL_VECTOR3_H_
10 A three-dimensional vector, applicable for Euclidean space.
13 class Vector3: public Vector<T, 3>
20 Vector3(const Vector<U, 3> &);
24 inline Vector3<T>::Vector3(const T *d):
29 inline Vector3<T>::Vector3(T x, T y, T z)
38 inline Vector3<T>::Vector3(const Vector<U, 3> &v):
43 inline T dot(const Vector3<T> &v1, const Vector3<T> &v2)
45 return inner_product(v1, v2);
49 inline Vector3<T> cross(const Vector3<T> &v1, const Vector3<T> &v2)
51 return Vector3<T>(v1[1]*v2[2]-v1[2]*v2[1], v1[2]*v2[0]-v1[0]*v2[2], v1[0]*v2[1]-v1[1]*v2[0]);