Documentation

Fraction extends Message
in package

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

Generated from protobuf message google.type.Fraction

Table of Contents

Properties

$denominator  : mixed
The value by which the numerator is divided, e.g. 3 in 2/3. Must be positive.
$numerator  : mixed
The numerator in the fraction, e.g. 2 in 2/3.

Methods

__construct()  : mixed
Constructor.
getDenominator()  : int|string
The value by which the numerator is divided, e.g. 3 in 2/3. Must be positive.
getNumerator()  : int|string
The numerator in the fraction, e.g. 2 in 2/3.
setDenominator()  : $this
The value by which the numerator is divided, e.g. 3 in 2/3. Must be positive.
setNumerator()  : $this
The numerator in the fraction, e.g. 2 in 2/3.

Properties

$denominator

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

protected mixed $denominator = 0

Generated from protobuf field int64 denominator = 2 [json_name = "denominator"];

$numerator

The numerator in the fraction, e.g. 2 in 2/3.

protected mixed $numerator = 0

Generated from protobuf field int64 numerator = 1 [json_name = "numerator"];

Methods

__construct()

Constructor.

public __construct([array<string|int, mixed> $data = NULL ]) : mixed
Parameters
$data : array<string|int, mixed> = NULL

{ Optional. Data for populating the Message object.

@type int|string $numerator
      The numerator in the fraction, 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.

}

getDenominator()

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

public getDenominator() : int|string

Generated from protobuf field int64 denominator = 2 [json_name = "denominator"];

Return values
int|string

getNumerator()

The numerator in the fraction, e.g. 2 in 2/3.

public getNumerator() : int|string

Generated from protobuf field int64 numerator = 1 [json_name = "numerator"];

Return values
int|string

setDenominator()

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

public setDenominator(int|string $var) : $this

Generated from protobuf field int64 denominator = 2 [json_name = "denominator"];

Parameters
$var : int|string
Return values
$this

setNumerator()

The numerator in the fraction, e.g. 2 in 2/3.

public setNumerator(int|string $var) : $this

Generated from protobuf field int64 numerator = 1 [json_name = "numerator"];

Parameters
$var : int|string
Return values
$this

        
On this page

Search results