Vec2i, IntRect: Add unequal operator
This commit is contained in:
		
							parent
							
								
									21247b18b5
								
							
						
					
					
						commit
						d1ee507ec4
					
				
					 1 changed files with 10 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -88,6 +88,11 @@ struct Vec2i
 | 
			
		|||
		return x == other.x && y == other.y;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	bool operator!=(const Vec2i &other) const
 | 
			
		||||
	{
 | 
			
		||||
		return !(*this == other);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	Vec2i &operator+=(const Vec2i &value)
 | 
			
		||||
	{
 | 
			
		||||
		x += value.x;
 | 
			
		||||
| 
						 | 
				
			
			@ -176,6 +181,11 @@ struct IntRect : SDL_Rect
 | 
			
		|||
		        w == other.w && h == other.h);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	bool operator!=(const IntRect &other) const
 | 
			
		||||
	{
 | 
			
		||||
		return !(*this == other);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	Vec2i pos() const
 | 
			
		||||
	{
 | 
			
		||||
		return Vec2i(x, y);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue