Fortran.Sign Method

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.0

Overload List

Sign(Double, Double) Copies the sign from one number to another.
Sign(Int32, Int32) Copies the sign from one number to another.
Sign(Single, Single) Copies the sign from one number to another.
Sign<T>(T, T) Copies the sign from one number to another.

Sign(Double, Double)

Copies the sign from one number to another.
C#
public static double Sign(
	double a,
	double b
)

Parameters

a  Double
The number whose sign to change.
b  Double
The number whose sign to copy.

Return Value

Double
A number with the magnitude of a and the sign of b.

Sign(Int32, Int32)

Copies the sign from one number to another.
C#
public static int Sign(
	int a,
	int b
)

Parameters

a  Int32
The number whose sign to change.
b  Int32
The number whose sign to copy.

Return Value

Int32
A number with the magnitude of a and the sign of b.

Sign<T>(T, T)

Copies the sign from one number to another.
C#
public static T Sign<T>(
	T a,
	T b
)

Parameters

a  T
The number whose sign to change.
b  T
The number whose sign to copy.

Type Parameters

T
The type of the numbers.

Return Value

T
A number with the magnitude of a and the sign of b.

Sign(Single, Single)

Copies the sign from one number to another.
C#
public static float Sign(
	float a,
	float b
)

Parameters

a  Single
The number whose sign to change.
b  Single
The number whose sign to copy.

Return Value

Single
A number with the magnitude of a and the sign of b.

See Also