{"name":"BIS_fnc_nearestPoint","operator":null,"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","replaced_by":[],"games":[{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma2","name":"Arma 2","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Computes nearest point in a line.","syntaxes":[{"syntax":"[start, end, point, is2D] call BIS_fnc_nearestPoint","since":null,"effect":null,"exec":null,"params":[{"name":"start","type":"Position","optional":false,"default":null,"description":"line start","types":["Position"],"since":null,"text":"start: Position - line start"},{"name":"end","type":"Position","optional":false,"default":null,"description":"line end","types":["Position"],"since":null,"text":"end: Position - line end"},{"name":"point","type":"Position","optional":false,"default":null,"description":"point to check against","types":["Position"],"since":null,"text":"point: Position - point to check against"},{"name":"is2D","type":"Boolean","optional":true,"default":"false","description":"2D calculation instead of 3D","types":["Boolean"],"since":null,"text":"is2D: Boolean - (Optional, default false) 2D calculation instead of 3D"}],"returns":{"type":"Position","types":["Position"],"description":"the line point that is closest to point","text":"Position - the line point that is closest to *point*"}}],"examples":[{"text":"```sqf\nprivate _idealLocation = [getMarkerPos \"base\", getMarkerPos \"destination\", getPos player, true] call BIS_fnc_nearestPoint;\n```","code":["private _idealLocation = [getMarkerPos \"base\", getMarkerPos \"destination\", getPos player, true] call BIS_fnc_nearestPoint;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["nearObjects","nearestObject","nearestObjects","BIS_fnc_nearestPosition","BIS_fnc_nearestNum","BIS_fnc_nearestRoad","BIS_fnc_nearestHelipad","BIS_fnc_isPosBlacklisted"],"notes":[],"categories":["Arma 2: Functions","Arma 2: New Functions","Arma 2: Operation Arrowhead: Functions","Arma 3: Functions","Function Group: Geometry","Functions","Introduced with Arma 2 version 1.00","Take On Helicopters: Functions"],"docblock":null,"filled_from_docblock":[]}