thebookofshaders/glossary/min
Kvmilos edb0e29f8a unified the singular/plural forms 2025-02-09 14:57:23 +01:00
..
README-ua.md add ukrainian translation 2023-08-06 20:36:42 +03:00
README-vi.md Translate the glossary section 2020-07-30 16:34:42 +07:00
README.md unified the singular/plural forms 2025-02-09 14:57:23 +01:00

README.md

Min

Return the lesser of two values

Declaration

float min(float x, float y)  
vec2 min(vec2 x, vec2 y)  
vec3 min(vec3 x, vec3 y)  
vec4 min(vec4 x, vec4 y)

vec2 min(vec2 x, float y)  
vec3 min(vec3 x, float y)  
vec4 min(vec4 x, float y)

Parameters

x specifies the first value to compare.

y specifies the second value to compare.

Description

min() returns the minimum of the two parameters. It returns y if y is less than x, otherwise it returns x.

See Also

max, abs, clamp, Chapter 05: Shaping Functions