StrictMath.FloorMod Method

Definition

Overloads

FloorMod(Int32, Int32)

Returns the floor modulus of the int arguments.

FloorMod(Int64, Int32)

Returns the floor modulus of the long and int arguments.

FloorMod(Int64, Int64)

Returns the floor modulus of the long arguments.

FloorMod(Int32, Int32)

Returns the floor modulus of the int arguments.

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

Parameters

x
Int32

the dividend

y
Int32

the divisor

Returns

the floor modulus x - (floorDiv(x, y) * y)

Attributes

Remarks

Returns the floor modulus of the int arguments.

The floor modulus is x - (floorDiv(x, y) * y), has the same sign as the divisor y, and is in the range of -abs(y) < r < +abs(y).

The relationship between floorDiv and floorMod is such that: <ul> <li>floorDiv(x, y) * y + floorMod(x, y) == x</ul>

See Math#floorMod(int, int) Math.floorMod for examples and a comparison to the % operator.

Added in 1.8.

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

FloorMod(Int64, Int32)

Returns the floor modulus of the long and int arguments.

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

Parameters

x
Int64

the dividend

y
Int32

the divisor

Returns

the floor modulus x - (floorDiv(x, y) * y)

Attributes

Remarks

Returns the floor modulus of the long and int arguments.

The floor modulus is x - (floorDiv(x, y) * y), has the same sign as the divisor y, and is in the range of -abs(y) < r < +abs(y).

The relationship between floorDiv and floorMod is such that: <ul> <li>floorDiv(x, y) * y + floorMod(x, y) == x</ul>

See Math#floorMod(int, int) Math.floorMod for examples and a comparison to the % operator.

Added in 9.

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

FloorMod(Int64, Int64)

Returns the floor modulus of the long arguments.

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

Parameters

x
Int64

the dividend

y
Int64

the divisor

Returns

the floor modulus x - (floorDiv(x, y) * y)

Attributes

Remarks

Returns the floor modulus of the long arguments.

The floor modulus is x - (floorDiv(x, y) * y), has the same sign as the divisor y, and is in the range of -abs(y) < r < +abs(y).

The relationship between floorDiv and floorMod is such that: <ul> <li>floorDiv(x, y) * y + floorMod(x, y) == x</ul>

See Math#floorMod(int, int) Math.floorMod for examples and a comparison to the % operator.

Added in 1.8.

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