mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-02-12 23:15:52 +08:00
clang-format and clang-tidy fixes for 7df4778f
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user