Collisions:
i need some advices about collsions(like what is more faster).
the 'if' code:
is more faster than:Code:Public Function CollisionPrecise(X1 As Long, Y1 As Long, Width1 As Long, Height1 As Long, X2 As Long, Y2 As Long, Width2 As Long, Height2 As Long) As Boolean If (X1 + Width1 >= X2 And X1 <= X2 + Width2) And (Y1 + Height1 >= Y2 And Y1 <= Y2 + Height2) Then CollisionPrecise = True Else CollisionPrecise = False End If End Function
IntersectRect() API function?





Reply With Quote