Method ConditionalSelect
- Namespace
- Zyl.VectorTraits.Numerics
- Assembly
- VectorTraits.dll
ConditionalSelect(bool, sbyte, sbyte)
Conditionally selects a value from two variables on a bitwise basis (按条件从两个变量中按位选择值).
[CLSCompliant(false)]
public static sbyte ConditionalSelect(bool condition, sbyte left, sbyte right)Parameters
- conditionbool
- The mask that is used to select a value from - leftor- right(用于从- left或- right中选择值的掩码).
- leftsbyte
- The variable that is selected when the corresponding bit in - conditionis one (当- condition中的对应位为 1 时选择的变量).
- rightsbyte
- The variable that is selected when the corresponding bit in - conditionis zero (当- condition中的对应位为 0 时选择的变量).
Returns
- sbyte
- A value whose bits come from - leftor- rightbased on the value of- condition(一个数值,其二进制位是根据- condition由- leftor- right组合而成).
ConditionalSelect(bool, byte, byte)
Conditionally selects a value from two variables on a bitwise basis (按条件从两个变量中按位选择值).
public static byte ConditionalSelect(bool condition, byte left, byte right)Parameters
- conditionbool
- The mask that is used to select a value from - leftor- right(用于从- left或- right中选择值的掩码).
- leftbyte
- The variable that is selected when the corresponding bit in - conditionis one (当- condition中的对应位为 1 时选择的变量).
- rightbyte
- The variable that is selected when the corresponding bit in - conditionis zero (当- condition中的对应位为 0 时选择的变量).
Returns
- byte
- A value whose bits come from - leftor- rightbased on the value of- condition(一个数值,其二进制位是根据- condition由- leftor- right组合而成).
ConditionalSelect(bool, short, short)
Conditionally selects a value from two variables on a bitwise basis (按条件从两个变量中按位选择值).
public static short ConditionalSelect(bool condition, short left, short right)Parameters
- conditionbool
- The mask that is used to select a value from - leftor- right(用于从- left或- right中选择值的掩码).
- leftshort
- The variable that is selected when the corresponding bit in - conditionis one (当- condition中的对应位为 1 时选择的变量).
- rightshort
- The variable that is selected when the corresponding bit in - conditionis zero (当- condition中的对应位为 0 时选择的变量).
Returns
- short
- A value whose bits come from - leftor- rightbased on the value of- condition(一个数值,其二进制位是根据- condition由- leftor- right组合而成).
ConditionalSelect(bool, ushort, ushort)
Conditionally selects a value from two variables on a bitwise basis (按条件从两个变量中按位选择值).
[CLSCompliant(false)]
public static ushort ConditionalSelect(bool condition, ushort left, ushort right)Parameters
- conditionbool
- The mask that is used to select a value from - leftor- right(用于从- left或- right中选择值的掩码).
- leftushort
- The variable that is selected when the corresponding bit in - conditionis one (当- condition中的对应位为 1 时选择的变量).
- rightushort
- The variable that is selected when the corresponding bit in - conditionis zero (当- condition中的对应位为 0 时选择的变量).
Returns
- ushort
- A value whose bits come from - leftor- rightbased on the value of- condition(一个数值,其二进制位是根据- condition由- leftor- right组合而成).
ConditionalSelect(bool, int, int)
Conditionally selects a value from two variables on a bitwise basis (按条件从两个变量中按位选择值).
public static int ConditionalSelect(bool condition, int left, int right)Parameters
- conditionbool
- The mask that is used to select a value from - leftor- right(用于从- left或- right中选择值的掩码).
- leftint
- The variable that is selected when the corresponding bit in - conditionis one (当- condition中的对应位为 1 时选择的变量).
- rightint
- The variable that is selected when the corresponding bit in - conditionis zero (当- condition中的对应位为 0 时选择的变量).
Returns
- int
- A value whose bits come from - leftor- rightbased on the value of- condition(一个数值,其二进制位是根据- condition由- leftor- right组合而成).
ConditionalSelect(bool, uint, uint)
Conditionally selects a value from two variables on a bitwise basis (按条件从两个变量中按位选择值).
[CLSCompliant(false)]
public static uint ConditionalSelect(bool condition, uint left, uint right)Parameters
- conditionbool
- The mask that is used to select a value from - leftor- right(用于从- left或- right中选择值的掩码).
- leftuint
- The variable that is selected when the corresponding bit in - conditionis one (当- condition中的对应位为 1 时选择的变量).
- rightuint
- The variable that is selected when the corresponding bit in - conditionis zero (当- condition中的对应位为 0 时选择的变量).
Returns
- uint
- A value whose bits come from - leftor- rightbased on the value of- condition(一个数值,其二进制位是根据- condition由- leftor- right组合而成).
ConditionalSelect(bool, long, long)
Conditionally selects a value from two variables on a bitwise basis (按条件从两个变量中按位选择值).
public static long ConditionalSelect(bool condition, long left, long right)Parameters
- conditionbool
- The mask that is used to select a value from - leftor- right(用于从- left或- right中选择值的掩码).
- leftlong
- The variable that is selected when the corresponding bit in - conditionis one (当- condition中的对应位为 1 时选择的变量).
- rightlong
- The variable that is selected when the corresponding bit in - conditionis zero (当- condition中的对应位为 0 时选择的变量).
Returns
- long
- A value whose bits come from - leftor- rightbased on the value of- condition(一个数值,其二进制位是根据- condition由- leftor- right组合而成).
ConditionalSelect(bool, ulong, ulong)
Conditionally selects a value from two variables on a bitwise basis (按条件从两个变量中按位选择值).
[CLSCompliant(false)]
public static ulong ConditionalSelect(bool condition, ulong left, ulong right)Parameters
- conditionbool
- The mask that is used to select a value from - leftor- right(用于从- left或- right中选择值的掩码).
- leftulong
- The variable that is selected when the corresponding bit in - conditionis one (当- condition中的对应位为 1 时选择的变量).
- rightulong
- The variable that is selected when the corresponding bit in - conditionis zero (当- condition中的对应位为 0 时选择的变量).
Returns
- ulong
- A value whose bits come from - leftor- rightbased on the value of- condition(一个数值,其二进制位是根据- condition由- leftor- right组合而成).
ConditionalSelect(bool, ExInt128, ExInt128)
Conditionally selects a value from two variables on a bitwise basis (按条件从两个变量中按位选择值).
public static ExInt128 ConditionalSelect(bool condition, ExInt128 left, ExInt128 right)Parameters
- conditionbool
- The mask that is used to select a value from - leftor- right(用于从- left或- right中选择值的掩码).
- leftExInt128
- The variable that is selected when the corresponding bit in - conditionis one (当- condition中的对应位为 1 时选择的变量).
- rightExInt128
- The variable that is selected when the corresponding bit in - conditionis zero (当- condition中的对应位为 0 时选择的变量).
Returns
- ExInt128
- A value whose bits come from - leftor- rightbased on the value of- condition(一个数值,其二进制位是根据- condition由- leftor- right组合而成).
ConditionalSelect(bool, ExUInt128, ExUInt128)
Conditionally selects a value from two variables on a bitwise basis (按条件从两个变量中按位选择值).
[CLSCompliant(false)]
public static ExUInt128 ConditionalSelect(bool condition, ExUInt128 left, ExUInt128 right)Parameters
- conditionbool
- The mask that is used to select a value from - leftor- right(用于从- left或- right中选择值的掩码).
- leftExUInt128
- The variable that is selected when the corresponding bit in - conditionis one (当- condition中的对应位为 1 时选择的变量).
- rightExUInt128
- The variable that is selected when the corresponding bit in - conditionis zero (当- condition中的对应位为 0 时选择的变量).
Returns
- ExUInt128
- A value whose bits come from - leftor- rightbased on the value of- condition(一个数值,其二进制位是根据- condition由- leftor- right组合而成).
ConditionalSelect(bool, Int128, Int128)
Conditionally selects a value from two variables on a bitwise basis (按条件从两个变量中按位选择值).
public static Int128 ConditionalSelect(bool condition, Int128 left, Int128 right)Parameters
- conditionbool
- The mask that is used to select a value from - leftor- right(用于从- left或- right中选择值的掩码).
- leftInt128
- The variable that is selected when the corresponding bit in - conditionis one (当- condition中的对应位为 1 时选择的变量).
- rightInt128
- The variable that is selected when the corresponding bit in - conditionis zero (当- condition中的对应位为 0 时选择的变量).
Returns
- Int128
- A value whose bits come from - leftor- rightbased on the value of- condition(一个数值,其二进制位是根据- condition由- leftor- right组合而成).
ConditionalSelect(bool, UInt128, UInt128)
Conditionally selects a value from two variables on a bitwise basis (按条件从两个变量中按位选择值).
[CLSCompliant(false)]
public static UInt128 ConditionalSelect(bool condition, UInt128 left, UInt128 right)Parameters
- conditionbool
- The mask that is used to select a value from - leftor- right(用于从- left或- right中选择值的掩码).
- leftUInt128
- The variable that is selected when the corresponding bit in - conditionis one (当- condition中的对应位为 1 时选择的变量).
- rightUInt128
- The variable that is selected when the corresponding bit in - conditionis zero (当- condition中的对应位为 0 时选择的变量).
Returns
- UInt128
- A value whose bits come from - leftor- rightbased on the value of- condition(一个数值,其二进制位是根据- condition由- leftor- right组合而成).
ConditionalSelect(bool, nint, nint)
Conditionally selects a value from two variables on a bitwise basis (按条件从两个变量中按位选择值).
public static nint ConditionalSelect(bool condition, nint left, nint right)Parameters
- conditionbool
- The mask that is used to select a value from - leftor- right(用于从- left或- right中选择值的掩码).
- leftnint
- The variable that is selected when the corresponding bit in - conditionis one (当- condition中的对应位为 1 时选择的变量).
- rightnint
- The variable that is selected when the corresponding bit in - conditionis zero (当- condition中的对应位为 0 时选择的变量).
Returns
- nint
- A value whose bits come from - leftor- rightbased on the value of- condition(一个数值,其二进制位是根据- condition由- leftor- right组合而成).
ConditionalSelect(bool, nuint, nuint)
Conditionally selects a value from two variables on a bitwise basis (按条件从两个变量中按位选择值).
[CLSCompliant(false)]
public static nuint ConditionalSelect(bool condition, nuint left, nuint right)Parameters
- conditionbool
- The mask that is used to select a value from - leftor- right(用于从- left或- right中选择值的掩码).
- leftnuint
- The variable that is selected when the corresponding bit in - conditionis one (当- condition中的对应位为 1 时选择的变量).
- rightnuint
- The variable that is selected when the corresponding bit in - conditionis zero (当- condition中的对应位为 0 时选择的变量).
Returns
- nuint
- A value whose bits come from - leftor- rightbased on the value of- condition(一个数值,其二进制位是根据- condition由- leftor- right组合而成).
ConditionalSelect(bool, float, float)
Conditionally selects a value from two variables on a bitwise basis (按条件从两个变量中按位选择值).
public static float ConditionalSelect(bool condition, float left, float right)Parameters
- conditionbool
- The mask that is used to select a value from - leftor- right(用于从- left或- right中选择值的掩码).
- leftfloat
- The variable that is selected when the corresponding bit in - conditionis one (当- condition中的对应位为 1 时选择的变量).
- rightfloat
- The variable that is selected when the corresponding bit in - conditionis zero (当- condition中的对应位为 0 时选择的变量).
Returns
- float
- A value whose bits come from - leftor- rightbased on the value of- condition(一个数值,其二进制位是根据- condition由- leftor- right组合而成).
ConditionalSelect(bool, double, double)
Conditionally selects a value from two variables on a bitwise basis (按条件从两个变量中按位选择值).
public static double ConditionalSelect(bool condition, double left, double right)Parameters
- conditionbool
- The mask that is used to select a value from - leftor- right(用于从- left或- right中选择值的掩码).
- leftdouble
- The variable that is selected when the corresponding bit in - conditionis one (当- condition中的对应位为 1 时选择的变量).
- rightdouble
- The variable that is selected when the corresponding bit in - conditionis zero (当- condition中的对应位为 0 时选择的变量).
Returns
- double
- A value whose bits come from - leftor- rightbased on the value of- condition(一个数值,其二进制位是根据- condition由- leftor- right组合而成).
ConditionalSelect(bool, Half, Half)
Conditionally selects a value from two variables on a bitwise basis (按条件从两个变量中按位选择值).
public static Half ConditionalSelect(bool condition, Half left, Half right)Parameters
- conditionbool
- The mask that is used to select a value from - leftor- right(用于从- left或- right中选择值的掩码).
- leftHalf
- The variable that is selected when the corresponding bit in - conditionis one (当- condition中的对应位为 1 时选择的变量).
- rightHalf
- The variable that is selected when the corresponding bit in - conditionis zero (当- condition中的对应位为 0 时选择的变量).
Returns
- Half
- A value whose bits come from - leftor- rightbased on the value of- condition(一个数值,其二进制位是根据- condition由- leftor- right组合而成).