From ea117764ef5456625c8167ba72673ff5e6c019e6 Mon Sep 17 00:00:00 2001 From: github-actions <${GITHUB_ACTOR}@users.noreply.github.com> Date: Sat, 6 Nov 2021 06:55:28 +0000 Subject: [PATCH] clang-format and clang-tidy fixes for 7df4778f --- geometry/graham_scan_functions.hpp | 10 ++++++---- numerical_methods/composite_simpson_rule.cpp | 7 +++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/geometry/graham_scan_functions.hpp b/geometry/graham_scan_functions.hpp index 976d8ad4c..63dbc1b7f 100644 --- a/geometry/graham_scan_functions.hpp +++ b/geometry/graham_scan_functions.hpp @@ -96,8 +96,9 @@ int distSq(Point p1, Point p2) { int orientation(Point p, Point q, Point r) { int val = (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y); - if (val == 0) - return 0; // collinear + if (val == 0) { + return 0; // collinear + } return (val > 0) ? 1 : 2; // clock or counter-clock wise } @@ -165,8 +166,9 @@ std::vector convexHull(std::vector points, uint64_t size) { // If modified array of points has less than 3 points, convex hull is not // possible - if (m < 3) - return {}; + if (m < 3) { + return {} + }; // Create an empty stack and push first three points to it. std::stack S; diff --git a/numerical_methods/composite_simpson_rule.cpp b/numerical_methods/composite_simpson_rule.cpp index 085b431ff..2ca58cbe4 100644 --- a/numerical_methods/composite_simpson_rule.cpp +++ b/numerical_methods/composite_simpson_rule.cpp @@ -35,16 +35,15 @@ * */ -#include /// for assert -#include /// for math functions +#include /// for assert +#include /// for math functions +#include #include /// for integer allocation #include /// for std::atof #include /// for std::function #include /// for IO operations #include /// for std::map container -#include "math.h" - /** * @namespace numerical_methods * @brief Numerical algorithms/methods