Percent

type.v3.Percent

[type.v3.Percent proto]

Identifies a percentage, in the range [0.0, 100.0].

{
  "value": "..."
}
Copy to clipboard
value

(double)

type.v3.FractionalPercent

[type.v3.FractionalPercent proto]

A fractional percentage is used in cases in which for performance reasons performing floating point to integer conversions during randomness calculations is undesirable. The message includes both a numerator and denominator that together determine the final fractional value.

  • Example: 1/100 = 1%.

  • Example: 3/10000 = 0.03%.

{
  "numerator": "...",
  "denominator": "..."
}
Copy to clipboard
numerator

(uint32) Specifies the numerator. Defaults to 0.

denominator

(type.v3.FractionalPercent.DenominatorType) Specifies the denominator. If the denominator specified is less than the numerator, the final fractional percentage is capped at 1 (100%).

Enum type.v3.FractionalPercent.DenominatorType

[type.v3.FractionalPercent.DenominatorType proto]

Fraction percentages support several fixed denominator values.

HUNDRED

(DEFAULT) ⁣100.

Example: 1/100 = 1%.

TEN_THOUSAND

⁣10,000.

Example: 1/10000 = 0.01%.

MILLION

⁣1,000,000.

Example: 1/1000000 = 0.0001%.