void CMShape::SetSize(CMVector2<float> s) { _width *= (s.getX() / _size.getX()); _size.setX(s.getX()); _height *= (s.getY() / _size.getY()); _size.setY(s.getY()); }
bool intersectPointRect(CMVector2 point, CMVector2 min, CMVector2 max) { if (point.getX() >= min.getX() && point.getX() <= max.getX() && point.getY() >= min.getY() && point.getY() <= max.getY()) { return true; } return false; }