{"name":"BIS_fnc_nearestPoint","title":"BIS fnc nearestPoint","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_nearestPoint","revid":328376,"updated":"2022-07-13T16:00:48Z","groups":["Geometry"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Computes nearest point in a line.","syntaxes":[{"syntax":"[start, end, point, is2D] call BIS_fnc_nearestPoint","params":[{"name":"start","type":"Position","description":"line start","type_expr":"Position"},{"name":"end","type":"Position","description":"line end","type_expr":"Position"},{"name":"point","type":"Position","description":"point to check against","type_expr":"Position"},{"name":"is2D","type":"Boolean","optional":true,"default":"false","description":"2D calculation instead of 3D","type_expr":"Boolean","text":"is2D: Boolean - (Optional, default false) 2D calculation instead of 3D"}],"returns":{"type":"Position","type_expr":"Position","description":"the line point that is closest to point","text":"Position - the line point that is closest to *point*"}}],"examples":[{"code":["private _idealLocation = [getMarkerPos \"base\", getMarkerPos \"destination\", getPos player, true] call BIS_fnc_nearestPoint;"]}],"see_also":["nearObjects","nearestObject","nearestObjects","BIS_fnc_nearestPosition","BIS_fnc_nearestNum","BIS_fnc_nearestRoad","BIS_fnc_nearestHelipad","BIS_fnc_isPosBlacklisted"]}