]> rtime.felk.cvut.cz Git - hubacji1/bcar.git/blobdiff - src/bcar.cc
Add line heading getter
[hubacji1/bcar.git] / src / bcar.cc
index 8825fb77c63c1e088dcb19c78447962c2e82c624..d0d40a146b5abba0184d26d0cd87fcf1482bf233 100644 (file)
@@ -222,6 +222,12 @@ Line::len() const
        return this->b_.edist(this->e_);
 }
 
+double
+Line::h() const
+{
+       return atan2(this->e_.y() - this->b_.y(), this->e_.x() - this->b_.x());
+}
+
 std::ostream&
 operator<<(std::ostream& out, Line const& li)
 {