Skip to content

Commit

Permalink
apply fix-format from ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
luk036 committed May 1, 2024
1 parent 68c8455 commit 4dfea18
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 34 deletions.
12 changes: 6 additions & 6 deletions include/recti/interval.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ namespace recti {
*
* @return an `Interval` object.
*/
template <typename U>
friend constexpr auto operator+(Interval rhs, const U &alpha) -> Interval {
template <typename U> friend constexpr auto operator+(Interval rhs, const U &alpha)
-> Interval {
return rhs += alpha;
}

Expand Down Expand Up @@ -281,8 +281,8 @@ namespace recti {
*
* @return an `Interval` object.
*/
template <typename U>
friend constexpr auto operator-(const Interval &rhs, const U &alpha) -> Interval {
template <typename U> friend constexpr auto operator-(const Interval &rhs, const U &alpha)
-> Interval {
auto lower = rhs.lb() - alpha;
auto upper = rhs.ub() - alpha;
return Interval<decltype(lower)>{std::move(lower), std::move(upper)};
Expand Down Expand Up @@ -424,8 +424,8 @@ namespace recti {
* @param[in] intvl
* @return Stream&
*/
template <class Stream>
friend auto operator<<(Stream &out, const Interval &intvl) -> Stream & {
template <class Stream> friend auto operator<<(Stream &out, const Interval &intvl)
-> Stream & {
out << "[" << intvl.lb() << ", " << intvl.ub() << "]";
return out;
}
Expand Down
4 changes: 2 additions & 2 deletions include/recti/merge_obj.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ namespace recti {
* @param[in] p
* @return Stream&
*/
template <class Stream>
friend auto operator<<(Stream &out, const MergeObj &merge_obj) -> Stream & {
template <class Stream> friend auto operator<<(Stream &out, const MergeObj &merge_obj)
-> Stream & {
out << "/" << merge_obj.xcoord() << ", " << merge_obj.ycoord() << "/";
return out;
}
Expand Down
8 changes: 4 additions & 4 deletions include/recti/point.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ namespace recti {
* @param[in] rhs - The vector to translate this Point by.
* @return Reference to this Point after translation.
*/
template <typename U1, typename U2>
CONSTEXPR14 auto operator+=(const Vector2<U1, U2> &rhs) -> Self & {
template <typename U1, typename U2> CONSTEXPR14 auto operator+=(const Vector2<U1, U2> &rhs)
-> Self & {
this->_xcoord += rhs.x();
this->_ycoord += rhs.y();
return *this;
Expand Down Expand Up @@ -184,8 +184,8 @@ namespace recti {
* @param[in] rhs - The vector to translate this Point by.
* @return Reference to this Point after translation.
*/
template <typename U1, typename U2>
CONSTEXPR14 auto operator-=(const Vector2<U1, U2> &rhs) -> Self & {
template <typename U1, typename U2> CONSTEXPR14 auto operator-=(const Vector2<U1, U2> &rhs)
-> Self & {
this->_xcoord -= rhs.x();
this->_ycoord -= rhs.y();
return *this;
Expand Down
16 changes: 8 additions & 8 deletions include/recti/polygon.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ namespace recti {
* @param[in] r
* @return Stream&
*/
template <class Stream, typename T>
auto operator<<(Stream &out, const Polygon<T> &poly) -> Stream & {
template <class Stream, typename T> auto operator<<(Stream &out, const Polygon<T> &poly)
-> Stream & {
for (auto &&vtx : poly) {
out << " \\draw " << vtx << ";\n";
}
Expand Down Expand Up @@ -129,8 +129,8 @@ namespace recti {
* @param[in] first
* @param[in] last
*/
template <typename FwIter>
inline auto create_xmono_polygon(FwIter &&first, FwIter &&last) -> void {
template <typename FwIter> inline auto create_xmono_polygon(FwIter &&first, FwIter &&last)
-> void {
return create_mono_polygon(first, last, [](const auto &lhs, const auto &rhs) -> bool {
return std::make_pair(lhs.xcoord(), lhs.ycoord())
< std::make_pair(rhs.xcoord(), rhs.ycoord());
Expand All @@ -144,8 +144,8 @@ namespace recti {
* @param[in] first
* @param[in] last
*/
template <typename FwIter>
inline auto create_ymono_polygon(FwIter &&first, FwIter &&last) -> void {
template <typename FwIter> inline auto create_ymono_polygon(FwIter &&first, FwIter &&last)
-> void {
return create_mono_polygon(first, last, [](const auto &lhs, const auto &rhs) -> bool {
return std::make_pair(lhs.ycoord(), lhs.xcoord())
< std::make_pair(rhs.ycoord(), rhs.xcoord());
Expand Down Expand Up @@ -202,8 +202,8 @@ namespace recti {
* @return true
* @return false
*/
template <typename T>
inline auto polygon_is_clockwise(gsl::span<const Point<T>> pointset) -> bool {
template <typename T> inline auto polygon_is_clockwise(gsl::span<const Point<T>> pointset)
-> bool {
auto it1 = std::min_element(pointset.begin(), pointset.end());
auto it0 = it1 != pointset.begin() ? std::prev(it1) : std::prev(pointset.end());
auto it2 = std::next(it1) != pointset.end() ? std::next(it1) : pointset.begin();
Expand Down
12 changes: 6 additions & 6 deletions include/recti/rpolygon.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ namespace recti {
* @return true
* @return false
*/
template <typename FwIter>
inline auto create_xmono_rpolygon(FwIter &&first, FwIter &&last) -> bool {
template <typename FwIter> inline auto create_xmono_rpolygon(FwIter &&first, FwIter &&last)
-> bool {
return create_mono_rpolygon(
first, last, [](const auto &pt) { return std::make_pair(pt.xcoord(), pt.ycoord()); });
}
Expand All @@ -154,8 +154,8 @@ namespace recti {
* @return true
* @return false
*/
template <typename FwIter>
inline auto create_ymono_rpolygon(FwIter &&first, FwIter &&last) -> bool {
template <typename FwIter> inline auto create_ymono_rpolygon(FwIter &&first, FwIter &&last)
-> bool {
return create_mono_rpolygon(
first, last, [](const auto &pt) { return std::make_pair(pt.ycoord(), pt.xcoord()); });
}
Expand Down Expand Up @@ -262,8 +262,8 @@ namespace recti {
* @return true
* @return false
*/
template <typename T>
inline auto rpolygon_is_clockwise(gsl::span<const Point<T>> pointset) -> bool {
template <typename T> inline auto rpolygon_is_clockwise(gsl::span<const Point<T>> pointset)
-> bool {
auto it1 = std::min_element(pointset.begin(), pointset.end());
auto it0 = it1 != pointset.begin() ? std::prev(it1) : pointset.end() - 1;
if (it1->ycoord() < it0->ycoord()) {
Expand Down
16 changes: 8 additions & 8 deletions include/recti/vector2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,8 @@ namespace recti {
* @param[in] alpha
* @return vector2
*/
template <typename R>
friend constexpr auto operator*(Vector2 rhs, const R &alpha) -> Vector2 {
template <typename R> friend constexpr auto operator*(Vector2 rhs, const R &alpha)
-> Vector2 {
return rhs *= alpha;
}

Expand All @@ -288,8 +288,8 @@ namespace recti {
* @param[in] x
* @return vector2
*/
template <typename R>
friend constexpr auto operator*(const R &alpha, Vector2 lhs) -> Vector2 {
template <typename R> friend constexpr auto operator*(const R &alpha, Vector2 lhs)
-> Vector2 {
return lhs *= alpha;
}

Expand All @@ -301,8 +301,8 @@ namespace recti {
* @param[in] alpha
* @return vector2
*/
template <typename R>
friend constexpr auto operator/(Vector2 rhs, const R &alpha) -> Vector2 {
template <typename R> friend constexpr auto operator/(Vector2 rhs, const R &alpha)
-> Vector2 {
return rhs /= alpha;
}

Expand All @@ -316,8 +316,8 @@ namespace recti {
* @param[in] v
* @return Stream&
*/
template <class Stream>
friend auto operator<<(Stream &out, const Vector2 &vec2) -> Stream & {
template <class Stream> friend auto operator<<(Stream &out, const Vector2 &vec2)
-> Stream & {
out << "{" << vec2.x() << ", " << vec2.y() << "}";
return out;
}
Expand Down

0 comments on commit 4dfea18

Please sign in to comment.