libstp
Robotics library for Botball
Loading...
Searching...
No Matches
MapSegment.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cmath>
4#include <cstdint>
5
6namespace libstp::map
7{
13 {
14 enum class Kind : uint8_t { Line, Wall };
15
17 float startX{0.0f};
18 float startY{0.0f};
19 float endX{0.0f};
20 float endY{0.0f};
21 float widthCm{0.0f};
22
26 float length() const noexcept
27 {
28 return std::hypot(endX - startX, endY - startY);
29 }
30 };
31}
float length() const noexcept