Method DivRem
- Namespace
- Zyl.VectorTraits.Numerics
- Assembly
- VectorTraits.dll
DivRem(int, int, out int)
Calculates the quotient of two 32-bit signed integers and also returns the remainder in an output parameter (计算两个 32 位有符号整数的商,并通过输出参数返回余数).
public static int DivRem(int a, int b, out int result)
Parameters
a
intThe dividend (被除数).
b
intThe divisor (除数).
result
intWhen this method returns, contains the remainder (当此方法返回时,包含余数).
Returns
- int
The quotient of the specified numbers (指定数字的商).
Exceptions
- DivideByZeroException
b
is zero.
DivRem(long, long, out long)
Calculates the quotient of two 64-bit signed integers and also returns the remainder in an output parameter (计算两个 32 位有符号整数的商,并通过输出参数返回余数).
public static long DivRem(long a, long b, out long result)
Parameters
a
longThe dividend (被除数).
b
longThe divisor (除数).
result
longWhen this method returns, contains the remainder (当此方法返回时,包含余数).
Returns
- long
The quotient of the specified numbers (指定数字的商).
Exceptions
- DivideByZeroException
b
is zero.
DivRem(sbyte, sbyte)
Produces the quotient and the remainder of two signed 8-bit numbers (生成两个 有符号8位数字 的商和余数).
[CLSCompliant(false)]
public static (sbyte Quotient, sbyte Remainder) DivRem(sbyte left, sbyte right)
Parameters
Returns
- (sbyte Quotient, sbyte Remainder)
The quotient and the remainder of the specified numbers (指定数字的商和余数).
DivRem(byte, byte)
Produces the quotient and the remainder of two unsigned 8-bit numbers (生成两个 无符号8位数字 的商和余数).
public static (byte Quotient, byte Remainder) DivRem(byte left, byte right)
Parameters
Returns
- (byte Quotient, byte Remainder)
The quotient and the remainder of the specified numbers (指定数字的商和余数).
DivRem(short, short)
Produces the quotient and the remainder of two signed 16-bit numbers (生成两个 有符号16位数字 的商和余数).
public static (short Quotient, short Remainder) DivRem(short left, short right)
Parameters
Returns
- (short Quotient, short Remainder)
The quotient and the remainder of the specified numbers (指定数字的商和余数).
DivRem(ushort, ushort)
Produces the quotient and the remainder of two unsigned 16-bit numbers (生成两个 无符号16位数字 的商和余数).
[CLSCompliant(false)]
public static (ushort Quotient, ushort Remainder) DivRem(ushort left, ushort right)
Parameters
Returns
- (ushort Quotient, ushort Remainder)
The quotient and the remainder of the specified numbers (指定数字的商和余数).
DivRem(int, int)
Produces the quotient and the remainder of two signed 32-bit numbers (生成两个 有符号32位数字 的商和余数).
public static (int Quotient, int Remainder) DivRem(int left, int right)
Parameters
Returns
DivRem(uint, uint)
Produces the quotient and the remainder of two unsigned 32-bit numbers (生成两个 无符号32位数字 的商和余数).
[CLSCompliant(false)]
public static (uint Quotient, uint Remainder) DivRem(uint left, uint right)
Parameters
Returns
- (uint Quotient, uint Remainder)
The quotient and the remainder of the specified numbers (指定数字的商和余数).
DivRem(long, long)
Produces the quotient and the remainder of two signed 64-bit numbers (生成两个 有符号64位数字 的商和余数).
public static (long Quotient, long Remainder) DivRem(long left, long right)
Parameters
Returns
- (long Quotient, long Remainder)
The quotient and the remainder of the specified numbers (指定数字的商和余数).
DivRem(ulong, ulong)
Produces the quotient and the remainder of two unsigned 64-bit numbers (生成两个 无符号64位数字 的商和余数).
[CLSCompliant(false)]
public static (ulong Quotient, ulong Remainder) DivRem(ulong left, ulong right)
Parameters
Returns
- (ulong Quotient, ulong Remainder)
The quotient and the remainder of the specified numbers (指定数字的商和余数).
DivRem(nint, nint)
Produces the quotient and the remainder of two signed native-size numbers (生成两个 有符号本机大小数字 的商和余数).
public static (nint Quotient, nint Remainder) DivRem(nint left, nint right)
Parameters
Returns
- (nint Quotient, nint Remainder)
The quotient and the remainder of the specified numbers (指定数字的商和余数).
DivRem(nuint, nuint)
Produces the quotient and the remainder of two unsigned native-size numbers (生成两个 无符号本机大小数字 的商和余数).
[CLSCompliant(false)]
public static (nuint Quotient, nuint Remainder) DivRem(nuint left, nuint right)