Civil Date PHP Package

EuclideanDivision
in package

FinalYes

Provides Euclidean quotient and remainder operations.

Table of Contents

Methods

quotient()  : int
Returns the quotient rounded toward negative infinity.
remainder()  : int
Returns the non-negative remainder for a positive divisor.

Methods

quotient()

Returns the quotient rounded toward negative infinity.

public static quotient(int $dividend, int $divisor) : int
Parameters
$dividend : int

Dividend.

$divisor : int

Positive divisor.

Tags
throws
DivisionByZeroError

If the divisor is zero.

Return values
int

Euclidean quotient.

remainder()

Returns the non-negative remainder for a positive divisor.

public static remainder(int $dividend, int $divisor) : int
Parameters
$dividend : int

Dividend.

$divisor : int

Positive divisor.

Tags
throws
DivisionByZeroError

If the divisor is zero.

Return values
int

Euclidean remainder.

On this page

Search results