[COLOR=black][FONT=Arial]The title of this post may not make much sense, let me explain…[/FONT][/COLOR]
[COLOR=black][FONT=Arial]I have a function:[/FONT][/COLOR]
[COLOR=black][FONT=Arial]findSurface(origin:Point, vector:Point, attempts:Number):Point {…}[/FONT][/COLOR]
[COLOR=black][FONT=Arial]The function has an obscure use, but the idea is thus: given those three arguments, returns a point IF the ‘line’ (created by the origin and vector arguments) intersects the object the function is called on. [but that is another story…][/FONT][/COLOR]
[COLOR=black][FONT=Arial]More importantly, if there is no point of intersection at all, what should the function return? Void? Null? Undefined? Object? Or can I use one of those return types instead of Point incase the function does not encounter an intersection?[/FONT][/COLOR]
[COLOR=black][FONT=Arial]I’d be glad to try explaining better if anyone might know, thanks.[/FONT][/COLOR]