?? findmiddlepoint.asv
字號:
function p0=findmiddlepoint(p1,p2,zonepoint)
p0=(p1+p2)/2; %find the middle point;
codep0=getzonecode(zonepoint,p0);
codep1=getzonecode(zonepoint,p1);
codep2=getzonecode(zonepoint,p2);
while codep0~=0 %if the middle point is not in the area, continue to find it
p0=(p1+p2)/2; %find the middle point;
codep0=getzonecode(zonepoint,p0);
if codep0==0 %this point is in the area break;
break;
else %this p0 is not in the area
judge1=bitand(codep0,codep1);
if judge1~=0 %means the p1 can be replaced by p0
p1=p0;
else p2=p0;
end
end
end
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -