Here is the code from fn_inTrigger.sqf
//--- ELLIPSE
_e = sqrt(_tx^2 - _ty^2);
This is only correct if _tx is major and _ty is minor radii (i.e. _tx >= _ty).
{F24108}
Here is the code from fn_inTrigger.sqf
//--- ELLIPSE
_e = sqrt(_tx^2 - _ty^2);
This is only correct if _tx is major and _ty is minor radii (i.e. _tx >= _ty).
{F24108}
Could be fixed by swapping _tx and _ty
//--- ELLIPSE
if (_ty > _tx) then { _e = _tx; _tx = _ty; _ty = _e; _tdir = _tdir + 90; };
_e = sqrt(abs(_tx^2 - _ty^2));
Please see attached mission resproducing the bug.
Another issue with this function is that _dify is not checked against zero before devision:
_dir = atan (_difx / _dify);
Here is an error from rpt file:
Error in expression < select 1) - _tPosy;
_dir = atan (_difx / _dify);
if (_dify < 0) then {_dir = _d>
Error position: </ _dify);
if (_dify < 0) then {_dir = _d>
Error Zero divisor
This is still broken for elliptical markers if axisB > axisA.
Triggers are ok as you can not create a trigger that has axisB > axisA as they automatically have their dir rotated 90degrees and axis swapped.