Share via


StrictMath.Signum Method

Definition

Overloads

Signum(Double)

Returns the signum function of the argument; zero if the argument is zero, 1.

Signum(Single)

Returns the signum function of the argument; zero if the argument is zero, 1.

Signum(Double)

Returns the signum function of the argument; zero if the argument is zero, 1.

[Android.Runtime.Register("signum", "(D)D", "")]
public static double Signum (double d);
[<Android.Runtime.Register("signum", "(D)D", "")>]
static member Signum : double -> double

Parameters

d
Double

the floating-point value whose signum is to be returned

Returns

the signum function of the argument

Attributes

Remarks

Returns the signum function of the argument; zero if the argument is zero, 1.0 if the argument is greater than zero, -1.0 if the argument is less than zero.

Special Cases: <ul> <li> If the argument is NaN, then the result is NaN. <li> If the argument is positive zero or negative zero, then the result is the same as the argument. </ul>

Added in 1.5.

Java documentation for java.lang.StrictMath.signum(double).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Signum(Single)

Returns the signum function of the argument; zero if the argument is zero, 1.

[Android.Runtime.Register("signum", "(F)F", "")]
public static float Signum (float f);
[<Android.Runtime.Register("signum", "(F)F", "")>]
static member Signum : single -> single

Parameters

f
Single

the floating-point value whose signum is to be returned

Returns

the signum function of the argument

Attributes

Remarks

Returns the signum function of the argument; zero if the argument is zero, 1.0f if the argument is greater than zero, -1.0f if the argument is less than zero.

Special Cases: <ul> <li> If the argument is NaN, then the result is NaN. <li> If the argument is positive zero or negative zero, then the result is the same as the argument. </ul>

Added in 1.5.

Java documentation for java.lang.StrictMath.signum(float).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to