modf - HLSL
Microsoft DirectX 9.0 SDK Update (October 2004)

modf - HLSL


Splits the value x into fractional and integer parts, each of which has the same sign as x. The signed fractional portion of x is returned. The integer portion is stored in the output parameter ip.

Syntax

ret modf(x, out ip)

Where:

NameIn/OutTemplate TypeComponent TypeSize
xinscalar, vector, or matrixfloat, intany
ipoutsame as input xfloat, intsame dimension(s) as input x
retoutsame as input xfloat, intsame dimension(s) as input x

Minimum Shader Version

This intrinsic function is supported in the following (or above) shader versions:

Vertex ShaderPixel Shader
vs_1_1ps_2_0


© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.