Share via


clamp Function

Clamps _X to the specified _Min and _Max range

inline float clamp(
   float _X,
   float _Min,
   float _Max
) restrict(amp);
inline int clamp(
   int _X,
   int _Min,
   int _Max
) restrict(amp);

Parameters

  • _X
    Integer value

  • _Min
    Integer value

  • _Max
    Integer value

Return Value

Returns the clamped value of _X

Requirements

Header: amp.h

Namespace: Concurrency::direct3d

See Also

Reference

Concurrency::direct3d Namespace