Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include "BrokenLine.h"
- #include "implementation.cpp"
- #include <cmath>
- using namespace std;
- int main() {
- BrokenLine l;
- l.add(Point(0, 0));
- l.add(Point(0, 1));
- l.add(Point(1, 1));
- l.add(Point(1, 0));
- for (int i = 0; i < l.size(); i++)
- cout << '(' << l.getPoint(i).x << ", " << l.getPoint(i).y << ")\n";
- cout << "Size: " << l.size() << "\nSplit()\n";
- l.split(0.5);
- for (int i = 0; i < l.size(); i++)
- std::cout << '(' << l.getPoint(i).x << ", " << l.getPoint(i).y << ")\n";
- std::cout << "Size: " << l.size() << std::endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement