Share via


StrictMath.FloorDiv Method

Definition

Overloads

FloorDiv(Int32, Int32)

Returns the largest (closest to positive infinity) int value that is less than or equal to the algebraic quotient.

FloorDiv(Int64, Int32)

Returns the largest (closest to positive infinity) long value that is less than or equal to the algebraic quotient.

FloorDiv(Int64, Int64)

Returns the largest (closest to positive infinity) long value that is less than or equal to the algebraic quotient.

FloorDiv(Int32, Int32)

Returns the largest (closest to positive infinity) int value that is less than or equal to the algebraic quotient.

[Android.Runtime.Register("floorDiv", "(II)I", "", ApiSince=24)]
public static int FloorDiv (int x, int y);
[<Android.Runtime.Register("floorDiv", "(II)I", "", ApiSince=24)>]
static member FloorDiv : int * int -> int

Parameters

x
Int32

the dividend

y
Int32

the divisor

Returns

the largest (closest to positive infinity) int value that is less than or equal to the algebraic quotient.

Attributes

Remarks

Returns the largest (closest to positive infinity) int value that is less than or equal to the algebraic quotient. There is one special case, if the dividend is the Integer#MIN_VALUE Integer.MIN_VALUE and the divisor is -1, then integer overflow occurs and the result is equal to the Integer.MIN_VALUE.

See Math#floorDiv(int, int) Math.floorDiv for examples and a comparison to the integer division / operator.

Added in 1.8.

Java documentation for java.lang.StrictMath.floorDiv(int, int).

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

FloorDiv(Int64, Int32)

Returns the largest (closest to positive infinity) long value that is less than or equal to the algebraic quotient.

[Android.Runtime.Register("floorDiv", "(JI)J", "", ApiSince=31)]
public static long FloorDiv (long x, int y);
[<Android.Runtime.Register("floorDiv", "(JI)J", "", ApiSince=31)>]
static member FloorDiv : int64 * int -> int64

Parameters

x
Int64

the dividend

y
Int32

the divisor

Returns

the largest (closest to positive infinity) int value that is less than or equal to the algebraic quotient.

Attributes

Remarks

Returns the largest (closest to positive infinity) long value that is less than or equal to the algebraic quotient. There is one special case, if the dividend is the Long#MIN_VALUE Long.MIN_VALUE and the divisor is -1, then integer overflow occurs and the result is equal to Long.MIN_VALUE.

See Math#floorDiv(int, int) Math.floorDiv for examples and a comparison to the integer division / operator.

Added in 9.

Java documentation for java.lang.StrictMath.floorDiv(long, int).

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

FloorDiv(Int64, Int64)

Returns the largest (closest to positive infinity) long value that is less than or equal to the algebraic quotient.

[Android.Runtime.Register("floorDiv", "(JJ)J", "", ApiSince=24)]
public static long FloorDiv (long x, long y);
[<Android.Runtime.Register("floorDiv", "(JJ)J", "", ApiSince=24)>]
static member FloorDiv : int64 * int64 -> int64

Parameters

x
Int64

the dividend

y
Int64

the divisor

Returns

the largest (closest to positive infinity) long value that is less than or equal to the algebraic quotient.

Attributes

Remarks

Returns the largest (closest to positive infinity) long value that is less than or equal to the algebraic quotient. There is one special case, if the dividend is the Long#MIN_VALUE Long.MIN_VALUE and the divisor is -1, then integer overflow occurs and the result is equal to the Long.MIN_VALUE.

See Math#floorDiv(int, int) Math.floorDiv for examples and a comparison to the integer division / operator.

Added in 1.8.

Java documentation for java.lang.StrictMath.floorDiv(long, long).

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