Click or drag to resize
Accord.NET (logo)

SpecialSign Method

Returns a with the sign of b.

Namespace:  Accord.Math
Assembly:  Accord.Math (in Accord.Math.dll) Version: 3.8.0
Syntax
public static double Sign(
	double a,
	double b
)
Request Example View Source

Parameters

a
Type: SystemDouble
b
Type: SystemDouble

Return Value

Type: Double
If B > 0 then the result is ABS(A), else it is -ABS(A).
Remarks
This is a port of the sign transfer function from EISPACK, and is is equivalent to C++'s std::copysign function.
See Also