Fortran.Sign Method

Definition

Namespace: Extreme.Mathematics.LinearAlgebra.Implementation
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23

Overload List

Sign(Double, Double) Copies the sign of a number.
Sign(Int32, Int32) Copies the sign of a number.
Sign(Single, Single) Copies the sign of a number.
Sign<T>(T, T) Copies the sign of a number.

Sign(Double, Double)

Copies the sign of a number.
C#
public static double Sign(
	double a,
	double b
)

Parameters

a  Double
A number that specifies the magnitude of the value to return.
b  Double
A number that specifies the sign to return.

Return Value

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

Sign(Int32, Int32)

Copies the sign of a number.
C#
public static int Sign(
	int a,
	int b
)

Parameters

a  Int32
A number that specifies the magnitude of the value to return.
b  Int32
A number that specifies the sign to return.

Return Value

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

Sign<T>(T, T)

Copies the sign of a number.
C#
public static T Sign<T>(
	T a,
	T b
)

Parameters

a  T
A number that specifies the magnitude of the value to return.
b  T
A number that specifies the sign to return.

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 of a number.
C#
public static float Sign(
	float a,
	float b
)

Parameters

a  Single
A number that specifies the magnitude of the value to return.
b  Single
A number that specifies the sign to return.

Return Value

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

See Also