VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Checks if one point is within another. Saves time when creating a collision detection engine.

by Walter Eigner (15 Submissions)
Category: Math/Dates
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 2nd December 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Checks if one point is within another. Saves time when creating a collision detection engine.

Rate Checks if one point is within another. Saves time when creating a collision detection engine.



Function checkHit(pointX As Single, pointY As Single, x1 As Single, y1 As Single, x2 As Single, y2 As Single) As Boolean
If pointX <= x2 And pointX >= x1 And pointY <= y2 And pointY >= y1 Then
checkHit = True
End If
End Function


Download this snippet    Add to My Saved Code

Checks if one point is within another. Saves time when creating a collision detection engine. Comments

No comments have been posted about Checks if one point is within another. Saves time when creating a collision detection engine.. Why not be the first to post a comment about Checks if one point is within another. Saves time when creating a collision detection engine..

Post your comment

Subject:
Message:
0/1000 characters