Commit 22944194 authored by Quentin Khan's avatar Quentin Khan

Add width member function to FBox

parent c199cca0
......@@ -202,6 +202,13 @@ public:
rearrange_corners();
}
/** Returns the width for given dimension */
auto width(std::size_t dim) const noexcept
-> decltype(std::abs(_c2[dim] - _c1[dim]))
{
return std::abs(_c2[dim] - _c1[dim]);
}
/** Sums the corners of two boxes */
FBox operator+(const FBox& other) const {
return FBox(_c1 + other._c1, _c2 + other._c2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment