Skip to content

Latest commit

 

History

History
100 lines (50 loc) · 3.04 KB

dx-graphics-hlsl-fmod.md

File metadata and controls

100 lines (50 loc) · 3.04 KB
title description ms.assetid keywords topic_type api_name api_location api_type ms.topic ms.date
fmod (Corecrt\_math.h)
Returns the floating-point remainder of x/y.
bb940548-c4c5-4109-a488-4ea7295c7213
fmod HLSL
apiref
fmod
corecrt_math.h
HeaderDef
reference
05/31/2018

fmod

Returns the floating-point remainder of x/y.

ret fmod(x, y)

Parameters

Item Description
x
[in] The floating-point dividend.
y
[in] The floating-point divisor.

Return Value

The floating-point remainder of the x parameter divided by the y parameter.

Remarks

The floating-point remainder is calculated such that x = i * y + f, where i is an integer, f has the same sign as x, and the absolute value of f is less than the absolute value of y.

Type Description

Name Template Type Component Type Size
x scalar, vector, or matrix float any
y same as input x float same dimension(s) as input x
ret same as input x float 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) vs_1_1

Requirements

Requirement Value
Header
Corecrt_math.h

See also

Intrinsic Functions (DirectX HLSL)