Partager via


StrictMath.NextUp Method

Definition

Overloads

NextUp(Double)

Returns the floating-point value adjacent to d in the direction of positive infinity.

NextUp(Single)

Returns the floating-point value adjacent to f in the direction of positive infinity.

NextUp(Double)

Returns the floating-point value adjacent to d in the direction of positive infinity.

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

Parameters

d
Double

starting floating-point value

Returns

The adjacent floating-point value closer to positive infinity.

Attributes

Remarks

Returns the floating-point value adjacent to d in the direction of positive infinity. This method is semantically equivalent to nextAfter(d, Double.POSITIVE_INFINITY); however, a nextUp implementation may run faster than its equivalent nextAfter call.

Special Cases: <ul> <li> If the argument is NaN, the result is NaN.

<li> If the argument is positive infinity, the result is positive infinity.

<li> If the argument is zero, the result is Double#MIN_VALUE</ul>

Added in 1.6.

Java documentation for java.lang.StrictMath.nextUp(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

NextUp(Single)

Returns the floating-point value adjacent to f in the direction of positive infinity.

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

Parameters

f
Single

starting floating-point value

Returns

The adjacent floating-point value closer to positive infinity.

Attributes

Remarks

Returns the floating-point value adjacent to f in the direction of positive infinity. This method is semantically equivalent to nextAfter(f, Float.POSITIVE_INFINITY); however, a nextUp implementation may run faster than its equivalent nextAfter call.

Special Cases: <ul> <li> If the argument is NaN, the result is NaN.

<li> If the argument is positive infinity, the result is positive infinity.

<li> If the argument is zero, the result is Float#MIN_VALUE</ul>

Added in 1.6.

Java documentation for java.lang.StrictMath.nextUp(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