Compartilhar via


StrictMath.CeilMod Method

Definition

Overloads

CeilMod(Int32, Int32)

Returns the ceiling modulus of the int arguments.

CeilMod(Int64, Int32)

Returns the ceiling modulus of the long and int arguments.

CeilMod(Int64, Int64)

Returns the ceiling modulus of the long arguments.

CeilMod(Int32, Int32)

Returns the ceiling modulus of the int arguments.

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

Parameters

x
Int32

the dividend

y
Int32

the divisor

Returns

the ceiling modulus x - (ceilDiv(x, y) * y)

Attributes

Remarks

Returns the ceiling modulus of the int arguments.

The ceiling modulus is r = x - (ceilDiv(x, y) * y), has the opposite sign as the divisor y or is zero, and is in the range of -abs(y) < r < +abs(y).

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

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

Added in 18.

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

CeilMod(Int64, Int32)

Returns the ceiling modulus of the long and int arguments.

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

Parameters

x
Int64

the dividend

y
Int32

the divisor

Returns

the ceiling modulus x - (ceilDiv(x, y) * y)

Attributes

Remarks

Returns the ceiling modulus of the long and int arguments.

The ceiling modulus is r = x - (ceilDiv(x, y) * y), has the opposite sign as the divisor y or is zero, and is in the range of -abs(y) < r < +abs(y).

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

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

Added in 18.

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

CeilMod(Int64, Int64)

Returns the ceiling modulus of the long arguments.

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

Parameters

x
Int64

the dividend

y
Int64

the divisor

Returns

the ceiling modulus x - (ceilDiv(x, y) * y)

Attributes

Remarks

Returns the ceiling modulus of the long arguments.

The ceiling modulus is r = x - (ceilDiv(x, y) * y), has the opposite sign as the divisor y or is zero, and is in the range of -abs(y) < r < +abs(y).

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

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

Added in 18.

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