Skip to content

Latest commit

 

History

History
97 lines (53 loc) · 3.25 KB

dx-graphics-hlsl-min.md

File metadata and controls

97 lines (53 loc) · 3.25 KB
title description ms.assetid keywords topic_type api_name api_type ms.topic ms.date api_location
min
Selects the lesser of x and y.
4e10cfc2-d680-4d7f-81b2-fa52024f902d
min HLSL
apiref
min
NA
reference
05/31/2018

min

Selects the lesser of x and y.

ret min(x, y)

Parameters

Item Description
x
[in] The x input value.
y
[in] The y input value.

Return Value

The x or y parameter, whichever is the smallest value.

Remarks

Denormals are handled as follows:

src0 src1-> -inf F +inf NAN
-inf -inf -inf -inf -inf
F -inf src0 or src1 src0 src0
+inf -inf src1 +inf +inf
NaN -inf src1 +inf NaN

F means finite-real number.

Type Description

Name In/Out Template Type Component Type Size
x in scalar, vector, or matrix float, int any
y in same as input x float, int same dimension(s) as input x
ret return type same as input x float, int same dimension(s) as input x

Minimum Shader Model

This function is supported in the following shader models.

Shader Model Supported
Shader Model 2 (DirectX HLSL) and higher shader models yes
Shader Model 1 (DirectX HLSL) yes (vs_1_1 and ps_1_4)

See also

Intrinsic Functions (DirectX HLSL)

DirectX Functional Specification