Add equality op that compares against a clamped integer
This commit is contained in:
		
							parent
							
								
									35521c25c0
								
							
						
					
					
						commit
						43aacc13d9
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -270,6 +270,11 @@ struct NormValue
 | 
			
		|||
		norm = unNorm / 255.0;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	bool operator ==(int value) const
 | 
			
		||||
	{
 | 
			
		||||
		return unNorm == clamp(value, 0, 255);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	operator int() const
 | 
			
		||||
	{
 | 
			
		||||
		return unNorm;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue