mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 22:02:44 +00:00 
			
		
		
		
	AK: Allow clamp() with min==max
This commit is contained in:
		
							parent
							
								
									e901a3695a
								
							
						
					
					
						commit
						2309029cb4
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -87,7 +87,7 @@ inline constexpr T max(const T& a, const T& b) | ||||||
| template<typename T> | template<typename T> | ||||||
| inline constexpr T clamp(const T& value, const T& min, const T& max) | inline constexpr T clamp(const T& value, const T& min, const T& max) | ||||||
| { | { | ||||||
|     ASSERT(max > min); |     ASSERT(max >= min); | ||||||
|     if (value > max) |     if (value > max) | ||||||
|         return max; |         return max; | ||||||
|     if (value < min) |     if (value < min) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling