Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FormerLurker/ArcWelderLib.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFormerLurker <hochgebe@gmail.com>2020-05-10 19:37:34 +0300
committerFormerLurker <hochgebe@gmail.com>2020-05-10 19:37:34 +0300
commit4a1f1d55ff5e685a9f2818da7bf3f5e6bf0394d6 (patch)
tree6651c47d87298138aad30b28212c91d948fc5a92 /ArcWelder/segmented_shape.cpp
parent7be8bb7021bfe8e2ea79f572e798e17494253a5c (diff)
Replace math.h with cmath. Add settings and copyright to gcode output. Add line break to console progress output.
Diffstat (limited to 'ArcWelder/segmented_shape.cpp')
-rw-r--r--ArcWelder/segmented_shape.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/ArcWelder/segmented_shape.cpp b/ArcWelder/segmented_shape.cpp
index e2be390..21ca2b1 100644
--- a/ArcWelder/segmented_shape.cpp
+++ b/ArcWelder/segmented_shape.cpp
@@ -24,8 +24,7 @@
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#include "segmented_shape.h"
-
-#include <math.h>
+#include <cmath>
#include <iostream>
#pragma region Operators for Vector and Point
point operator +(point lhs, const vector rhs) {
@@ -151,7 +150,7 @@ double distance_from_segment(segment s, point p)
bool circle::is_point_on_circle(point p, double resolution_mm)
{
// get the difference between the point and the circle's center.
- double difference = abs(utilities::get_cartesian_distance(p.x, p.y, center.x, center.y) - radius);
+ double difference = std::abs(utilities::get_cartesian_distance(p.x, p.y, center.x, center.y) - radius);
return utilities::less_than(difference, resolution_mm, CIRCLE_FLOATING_POINT_TOLERANCE);
}