I want to make a function to check if a point is in range of a rhombus or not ,
Bool Conditional::InRange(Point P)
{
if( (P.x > Position.x-100) && (P.x < Position.x+100) &&
(P.y > Position.y-60) && (P.y < Position.y+60))
return true;
else
return false;
}
I end up with a rectangular range how to make this range be a rhombus ?? , where position is the center and the height =120 width =200