This article is made by Jason-Cow.Welcome to reprint.But please post the article's address. 好好领悟一下vector吧!加一行Left还可以判断是否在直线上... struct L{ D O;V v;db a; L(){} L(D O,V v):O(O),v(v){a=atan2(O.y,O.x);}//atan2(y,x)=atan(y/x) but the x is OK to be zero bl…