Run clang-format on the entire repo
This patch clang-formats the entire repo. Third-party code is
excluded.
I needed to fix up the .clang-format file so that all the header
includes are ordered properly. I could have sworn that it used to work
without the extra modification, but I guess not.
Signed-off-by: Philipp Schrader <philipp.schrader@gmail.com>
Change-Id: I64bb9f2c795401393f9dfe2fefc4f04cb36b52f6
diff --git a/y2018/control_loops/python/2d_plot.cc b/y2018/control_loops/python/2d_plot.cc
index 9fb1a35..1d2a686 100644
--- a/y2018/control_loops/python/2d_plot.cc
+++ b/y2018/control_loops/python/2d_plot.cc
@@ -8,8 +8,7 @@
DEFINE_double(yrange, 1.0, "+- y max");
double fx(double x, double yrange) {
- return 2.0 * ((1.0 / (1.0 + ::std::exp(-x * 2.0 / yrange)) - 0.5)) *
- yrange;
+ return 2.0 * ((1.0 / (1.0 + ::std::exp(-x * 2.0 / yrange)) - 0.5)) * yrange;
}
int main(int argc, char **argv) {
@@ -32,5 +31,4 @@
matplotlibcpp::plot(x, slope_y, {{"label", "slope"}});
matplotlibcpp::legend();
matplotlibcpp::show();
-
}
diff --git a/y2018/control_loops/python/arm_bounds.h b/y2018/control_loops/python/arm_bounds.h
index b69f661..c175616 100644
--- a/y2018/control_loops/python/arm_bounds.h
+++ b/y2018/control_loops/python/arm_bounds.h
@@ -25,7 +25,6 @@
typedef K::Line_2 Line;
typedef K::Vector_2 Vector;
-
// Returns true if the point p3 is to the left of the vector from p1 to p2.
inline bool is_left(Point p1, Point p2, Point p3) {
switch (CGAL::orientation(p1, p2, p3)) {
@@ -91,9 +90,9 @@
{bbox.xmin(), bbox.ymax()}};
return std::vector<Segment>({{points[0], points[1]},
- {points[1], points[2]},
- {points[2], points[3]},
- {points[3], points[0]}});
+ {points[1], points[2]},
+ {points[2], points[3]},
+ {points[3], points[0]}});
}
static bool check_inside(Point pt, const std::vector<Point> &points) {