mirror of
https://github.com/jhasse/poly2tri.git
synced 2024-11-30 01:03:30 +01:00
Move Point ctor into .cc file to hide shadowing from users
See #15 and #31.
This commit is contained in:
parent
7f0487a811
commit
136fa7acfc
@ -35,6 +35,10 @@
|
|||||||
|
|
||||||
namespace p2t {
|
namespace p2t {
|
||||||
|
|
||||||
|
Point::Point(double x, double y) : x(x), y(y)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
std::ostream& operator<<(std::ostream& out, const Point& point) {
|
std::ostream& operator<<(std::ostream& out, const Point& point) {
|
||||||
return out << point.x << "," << point.y;
|
return out << point.x << "," << point.y;
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,7 @@ struct Point {
|
|||||||
std::vector<Edge*> edge_list;
|
std::vector<Edge*> edge_list;
|
||||||
|
|
||||||
/// Construct using coordinates.
|
/// Construct using coordinates.
|
||||||
Point(double x, double y) : x(x), y(y) {}
|
Point(double x, double y);
|
||||||
|
|
||||||
/// Set this point to all zeros.
|
/// Set this point to all zeros.
|
||||||
void set_zero()
|
void set_zero()
|
||||||
|
Loading…
Reference in New Issue
Block a user