Guest User

Untitled

a guest
Jun 18th, 2018
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.52 KB | None | 0 0
  1. int main(){
  2.     //(0,0)->(2,0) and (1,1)->(3,1)
  3.     Segment l1(Point(0, 0), Point(2, 2));
  4.     Segment l2(Point(0, 0), Point(2, 0));
  5.     cout<<l1<<endl;
  6.     cout<<l2<<endl;
  7.     cout<<boolalpha;
  8.     cout<<"angle = "<<l1.angle(l2)<<endl;
  9.     cout<<"isParallel = "<<l1.isParallel(l2)<<endl;
  10.     cout<<"minDis = "<<l1.minDis(l2)<<endl;
  11.     cout<<"doIntersect = "<<l1.doIntersect(l2)<<endl;
  12.     cout<<"intersectPoint = "<<l1.intersectPoint(l2)<<endl;
  13.     cout<<"inSegment = "<<l2.isInSegment(Point(0, 0))<<endl;
  14.     return 0;
  15. }
Add Comment
Please, Sign In to add comment