clang-format and clang-tidy fixes for 7df4778f

This commit is contained in:
github-actions
2021-11-06 06:55:28 +00:00
parent 7df4778f28
commit ea117764ef
2 changed files with 9 additions and 8 deletions

View File

@@ -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<Point> convexHull(std::vector<Point> 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<Point> S;

View File

@@ -35,16 +35,15 @@
*
*/
#include <cassert> /// for assert
#include <cmath> /// for math functions
#include <cassert> /// for assert
#include <cmath> /// for math functions
#include <cmath>
#include <cstdint> /// for integer allocation
#include <cstdlib> /// for std::atof
#include <functional> /// for std::function
#include <iostream> /// for IO operations
#include <map> /// for std::map container
#include "math.h"
/**
* @namespace numerical_methods
* @brief Numerical algorithms/methods