diff --git a/src/unitvector.hh b/src/unitvector.hh index e2fbdf17e5aa38c0466cdf6735aabc05e4b3687e..200dfd48950a05d72b21b2b85d1881d294d9db3a 100644 --- a/src/unitvector.hh +++ b/src/unitvector.hh @@ -18,6 +18,11 @@ public: return *this; } + /** \brief Length of the great arc connecting the two points */ + static double distance(const UnitVector& a, const UnitVector& b) { + return std::acos(a.data_ * b.data_); + } + /** \brief Write LocalKey object to output stream */ friend std::ostream& operator<< (std::ostream& s, const UnitVector& unitVector) {