Try my new website:
www.urcho.com
- the new SIMPLE social network
Sign up
|
287
members |
114
snippets
Search for:
ALL
POPULAR
File Controls
Multiplayer Code
2D Effects
3D Effects
Oldskool demos
Basic Functions
Maths/Physics
Sound
Tutorials
Misc
Username:
Password:
Sign up
Point in Square Collision (Sqr)
[
back
]
Author:
Nebula
| Viewed:
504
times | Language:
BlitzPlus
| Category:
Maths/Physics
Function pointinsquare(x,y,x2,y2,s) ; X = collision x coordinate ; Y = collision y coordinate ; X2= X location rectangle ; Y2= Y location rectangle ; s = Width / Height of square box If Sqr(x-x2)^2 < s If Sqr(y-y2)^2 < s Return True End If:End If End Function
Author Comments:
Point (x,y) Collision in a Square box.
Login or
create an account
to comment on this snippet