API Reference › Percent › Percent.of
method

Percent.of

Percent.of(num, den) -> fixed

Forms the ratio num / den clamped to [0, 1] (0 when den is 0) — a filled-fraction from a part and a whole.

Example

program Demo {
  handler Step phase Update {
    let filled = Percent.of(current, maximum)
  }
}
← All symbols