Is there a func. to find if a point is in a rect?

BlitzMax Forums/BlitzMax Beginners Area/Is there a func. to find if a point is in a rect?

I would use an early out test, should be faster on average depending on how large the Rect is compared to the screen res.

Function InRect:Int(x:Int,y:Int,x1:Int,y1:Int,x2:Int,y2:Int)
	If x1>x Return False
	If x2<x Return False
	If y1>y Return False
	If y2<y Return False
	Return True
End Function