Method Sqrt
- Namespace
- Zyl.VectorTraits
- Assembly
- VectorTraits.dll
Sqrt(float)
Computes the square-root of a value (计算值的平方根).
Mnemonic: Sqrt(x) = Pow(x, 1.0/2)
. When x is less than 0, floating-point types return NaN, integer types return 0.
public static float Sqrt(float x)
Parameters
x
floatThe value whose square-root is to be computed (要计算其平方根的值).
Returns
- float
The square-root of
x
(x
的平方根).
- See Also
-
Sqrt(TSelf)
Sqrt(double)
Computes the square-root of a value (计算值的平方根).
Mnemonic: Sqrt(x) = Pow(x, 1.0/2)
. When x is less than 0, floating-point types return NaN, integer types return 0.
public static double Sqrt(double x)
Parameters
x
doubleThe value whose square-root is to be computed (要计算其平方根的值).
Returns
- double
The square-root of
x
(x
的平方根).
- See Also
-
Sqrt(TSelf)
Sqrt(sbyte)
Computes the square-root of a value (计算值的平方根).
Mnemonic: Sqrt(x) = Pow(x, 1.0/2)
. When x is less than 0, floating-point types return NaN, integer types return 0.
[CLSCompliant(false)]
public static sbyte Sqrt(sbyte x)
Parameters
x
sbyteThe value whose square-root is to be computed (要计算其平方根的值).
Returns
- sbyte
The square-root of
x
(x
的平方根).
- See Also
-
Sqrt(TSelf)
Sqrt(byte)
Computes the square-root of a value (计算值的平方根).
Mnemonic: Sqrt(x) = Pow(x, 1.0/2)
. When x is less than 0, floating-point types return NaN, integer types return 0.
public static byte Sqrt(byte x)
Parameters
x
byteThe value whose square-root is to be computed (要计算其平方根的值).
Returns
- byte
The square-root of
x
(x
的平方根).
- See Also
-
Sqrt(TSelf)
Sqrt(short)
Computes the square-root of a value (计算值的平方根).
Mnemonic: Sqrt(x) = Pow(x, 1.0/2)
. When x is less than 0, floating-point types return NaN, integer types return 0.
public static short Sqrt(short x)
Parameters
x
shortThe value whose square-root is to be computed (要计算其平方根的值).
Returns
- short
The square-root of
x
(x
的平方根).
- See Also
-
Sqrt(TSelf)
Sqrt(ushort)
Computes the square-root of a value (计算值的平方根).
Mnemonic: Sqrt(x) = Pow(x, 1.0/2)
. When x is less than 0, floating-point types return NaN, integer types return 0.
[CLSCompliant(false)]
public static ushort Sqrt(ushort x)
Parameters
x
ushortThe value whose square-root is to be computed (要计算其平方根的值).
Returns
- ushort
The square-root of
x
(x
的平方根).
- See Also
-
Sqrt(TSelf)
Sqrt(int)
Computes the square-root of a value (计算值的平方根).
Mnemonic: Sqrt(x) = Pow(x, 1.0/2)
. When x is less than 0, floating-point types return NaN, integer types return 0.
public static int Sqrt(int x)
Parameters
x
intThe value whose square-root is to be computed (要计算其平方根的值).
Returns
- int
The square-root of
x
(x
的平方根).
- See Also
-
Sqrt(TSelf)
Sqrt(uint)
Computes the square-root of a value (计算值的平方根).
Mnemonic: Sqrt(x) = Pow(x, 1.0/2)
. When x is less than 0, floating-point types return NaN, integer types return 0.
[CLSCompliant(false)]
public static uint Sqrt(uint x)
Parameters
x
uintThe value whose square-root is to be computed (要计算其平方根的值).
Returns
- uint
The square-root of
x
(x
的平方根).
- See Also
-
Sqrt(TSelf)
Sqrt(long)
Computes the square-root of a value (计算值的平方根).
Mnemonic: Sqrt(x) = Pow(x, 1.0/2)
. When x is less than 0, floating-point types return NaN, integer types return 0.
public static long Sqrt(long x)
Parameters
x
longThe value whose square-root is to be computed (要计算其平方根的值).
Returns
- long
The square-root of
x
(x
的平方根).
- See Also
-
Sqrt(TSelf)
Sqrt(ulong)
Computes the square-root of a value (计算值的平方根).
Mnemonic: Sqrt(x) = Pow(x, 1.0/2)
. When x is less than 0, floating-point types return NaN, integer types return 0.
[CLSCompliant(false)]
public static ulong Sqrt(ulong x)
Parameters
x
ulongThe value whose square-root is to be computed (要计算其平方根的值).
Returns
- ulong
The square-root of
x
(x
的平方根).
- See Also
-
Sqrt(TSelf)