📄 theta_impact.m
字号:
%
% This function recalculates the value of (Theta) depending on the impact
% location
%
%
function th=theta_impact(th,width,height,x0,y0)
if th>0 & th<90
if x0>=width
th=180-th;
return;
elseif y0>=height
th=360-th;
return;
end
elseif th>90 & th<180
if x0<=0
th=180-th;
return;
elseif y0>=height
th=360-th;
return;
end
elseif th>180 & th<270
if x0<=0
th=540-th;
return;
elseif y0<=0
th=360-th;
return;
end
elseif th>270 & th<360
if x0>=width
th=540-th;
return;
elseif y0<=0
th=360-th;
return;
end
elseif th==0 | th==360
th=180;
return;
elseif th==90
th=270;
return;
elseif th==180
th=0;
return;
elseif th==270
th=90;
return;
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -