MATH math math.
This is a simple problem if you apply a two coordinate grid system to it.
As example. A point inside your boundary is defined with an X and Y coordinate. Keeping the Y coordinate the same you will have two boundary coordinates, one of which is smaller than your point in X value and one which is larger in X value. Keeping your X coordinate the same you will have two boundary coordinates , one of which is smaller than your point in Y value and one which is larger.
IF THESE TWO CONDITIONS ARE NOT BOTH TRUE the point is NOT inside your boundary.
For a more complicated shape such as a circle with a smaller circle inside the logic becomes harder, but can be done with checks on odd or even amounts of points which are larger or smaller. Always though, the rule above will remain true.
MATH math math
This is a simple problem if you apply a two coordinate grid system to it.
As example. A point inside your boundary is defined with an X and Y coordinate. Keeping the Y coordinate the same you will have two boundary coordinates, one of which is smaller than your point in X value and one which is larger in X value. Keeping your X coordinate the same you will have two boundary coordinates , one of which is smaller than your point in Y value and one which is larger.
IF THESE TWO CONDITIONS ARE NOT BOTH TRUE the point is NOT inside your boundary.
For a more complicated shape such as a circle with a smaller circle inside the logic becomes harder, but can be done with checks on odd or even amounts of points which are larger or smaller. Always though, the rule above will remain true.
MATH math math