Try my new website:
www.urcho.com
- the new SIMPLE social network
Sign up
|
357
members |
125
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 rectangle collision (sqr)
[
back
]
Author:
Nebula
| Viewed:
719
times | Language:
BlitzBasic 3D
| Category:
Maths/Physics
Function pointinrect(x,y,x2,y2,w,h) ; X = collision x coordinate ; Y = collision y coordinate ; X2= X location rectangle ; Y2= Y location rectangle ; W = Width of rectangle ; H = Height of rectangle If Sqr(x-x2)^2 < w If Sqr(y-y2)^2 < h Return True End If:End If End Function
Author Comments:
Point in rectangle.
Login or
create an account
to comment on this snippet