class Fraction extends Message

Represents a fraction in terms of a numerator divided by a denominator.

Generated from protobuf message google.type.Fraction

Methods

__construct(array $data = NULL)

Constructor.

int|string
getNumerator()

The portion of the denominator in the faction, e.g. 2 in 2/3.

$this
setNumerator(int|string $var)

The portion of the denominator in the faction, e.g. 2 in 2/3.

int|string
getDenominator()

The value by which the numerator is divided, e.g. 3 in 2/3. Must be positive.

$this
setDenominator(int|string $var)

The value by which the numerator is divided, e.g. 3 in 2/3. Must be positive.

Details

at line 45
__construct(array $data = NULL)

Constructor.

Parameters

array $data { Optional. Data for populating the Message object.

@type int|string $numerator
      The portion of the denominator in the faction, e.g. 2 in 2/3.
@type int|string $denominator
      The value by which the numerator is divided, e.g. 3 in 2/3. Must be
      positive.

}

at line 56
int|string getNumerator()

The portion of the denominator in the faction, e.g. 2 in 2/3.

Generated from protobuf field int64 numerator = 1;

Return Value

int|string

at line 68
$this setNumerator(int|string $var)

The portion of the denominator in the faction, e.g. 2 in 2/3.

Generated from protobuf field int64 numerator = 1;

Parameters

int|string $var

Return Value

$this

at line 83
int|string getDenominator()

The value by which the numerator is divided, e.g. 3 in 2/3. Must be positive.

Generated from protobuf field int64 denominator = 2;

Return Value

int|string

at line 96
$this setDenominator(int|string $var)

The value by which the numerator is divided, e.g. 3 in 2/3. Must be positive.

Generated from protobuf field int64 denominator = 2;

Parameters

int|string $var

Return Value

$this