Table of Contents

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 float

The 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 double

The 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 sbyte

The 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 byte

The 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 short

The 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 ushort

The 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 int

The 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 uint

The 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 long

The 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 ulong

The value whose square-root is to be computed (要计算其平方根的值).

Returns

ulong

The square-root of x (x的平方根).

See Also
Sqrt(TSelf)