Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main(){
- //(0,0)->(2,0) and (1,1)->(3,1)
- Segment l1(Point(0, 0), Point(2, 2));
- Segment l2(Point(0, 0), Point(2, 0));
- cout<<l1<<endl;
- cout<<l2<<endl;
- cout<<boolalpha;
- cout<<"angle = "<<l1.angle(l2)<<endl;
- cout<<"isParallel = "<<l1.isParallel(l2)<<endl;
- cout<<"minDis = "<<l1.minDis(l2)<<endl;
- cout<<"doIntersect = "<<l1.doIntersect(l2)<<endl;
- cout<<"intersectPoint = "<<l1.intersectPoint(l2)<<endl;
- cout<<"inSegment = "<<l2.isInSegment(Point(0, 0))<<endl;
- return 0;
- }
Add Comment
Please, Sign In to add comment