Table of Contents

Method YClamp

Namespace
Zyl.VectorTraits.Impl.AVector
Assembly
VectorTraits.dll

YClamp(Vector<double>, Vector<double>, Vector<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 Vector<double> YClamp(Vector<double> value, Vector<double> amin, Vector<double> amax)

Parameters

value Vector<double>

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

amin Vector<double>

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

amax Vector<double>

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

Returns

Vector<double>

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

See Also

YClamp(Vector<long>, Vector<long>, Vector<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 Vector<long> YClamp(Vector<long> value, Vector<long> amin, Vector<long> amax)

Parameters

value Vector<long>

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

amin Vector<long>

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

amax Vector<long>

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

Returns

Vector<long>

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

See Also

YClamp(Vector<ulong>, Vector<ulong>, Vector<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 Vector<ulong> YClamp(Vector<ulong> value, Vector<ulong> amin, Vector<ulong> amax)

Parameters

value Vector<ulong>

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

amin Vector<ulong>

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

amax Vector<ulong>

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

Returns

Vector<ulong>

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

See Also