Table of Contents

Method YClamp

Namespace
Zyl.VectorTraits.Impl.AVector128
Assembly
VectorTraits.dll

YClamp(Vector128<double>, Vector128<double>, Vector128<double>)

Computes the numerical clamp of each element in a vector (计算向量中每个元素的数值限制). Mnemonic: rt[i] := clamp(value[i], amin[i], amax[i]) = min(max(amin[i], value[i]), amax[i]).

public static Vector128<double> YClamp(Vector128<double> value, Vector128<double> amin, Vector128<double> amax)

Parameters

value Vector128<double>

The vector that will have its clamp computed (将计算限制的向量).

amin Vector128<double>

The lower bound of the value (值的下限).

amax Vector128<double>

The upper bound of the value (值的上限).

Returns

Vector128<double>

A vector whose elements are the clamped to the inclusive range of amin and amax (一个向量,其元素是 限制在 aminamax 范围内的).

See Also

YClamp(Vector128<long>, Vector128<long>, Vector128<long>)

Computes the numerical clamp of each element in a vector (计算向量中每个元素的数值限制). Mnemonic: rt[i] := clamp(value[i], amin[i], amax[i]) = min(max(amin[i], value[i]), amax[i]).

public static Vector128<long> YClamp(Vector128<long> value, Vector128<long> amin, Vector128<long> amax)

Parameters

value Vector128<long>

The vector that will have its clamp computed (将计算限制的向量).

amin Vector128<long>

The lower bound of the value (值的下限).

amax Vector128<long>

The upper bound of the value (值的上限).

Returns

Vector128<long>

A vector whose elements are the clamped to the inclusive range of amin and amax (一个向量,其元素是 限制在 aminamax 范围内的).

See Also

YClamp(Vector128<ulong>, Vector128<ulong>, Vector128<ulong>)

Computes the numerical clamp of each element in a vector (计算向量中每个元素的数值限制). Mnemonic: rt[i] := clamp(value[i], amin[i], amax[i]) = min(max(amin[i], value[i]), amax[i]).

[CLSCompliant(false)]
public static Vector128<ulong> YClamp(Vector128<ulong> value, Vector128<ulong> amin, Vector128<ulong> amax)

Parameters

value Vector128<ulong>

The vector that will have its clamp computed (将计算限制的向量).

amin Vector128<ulong>

The lower bound of the value (值的下限).

amax Vector128<ulong>

The upper bound of the value (值的上限).

Returns

Vector128<ulong>

A vector whose elements are the clamped to the inclusive range of amin and amax (一个向量,其元素是 限制在 aminamax 范围内的).

See Also