| 33 | //-------------------------------------------------------------------------- |
| 34 | template<> |
| 35 | float BasicVector3D<float>::angle(const BasicVector3D<float> & v) const { |
| 36 | double cosa = 0; |
| 37 | double ptot = mag()*v.mag(); |
| 38 | if(ptot > 0) { |
| 39 | cosa = dot(v)/ptot; |
| 40 | if(cosa > 1) cosa = 1; |
| 41 | if(cosa < -1) cosa = -1; |
| 42 | } |
| 43 | return std::acos(cosa); |
| 44 | } |
| 45 | |
| 46 | //-------------------------------------------------------------------------- |
| 47 | template<> |
no test coverage detected