percentage
What percent part is of total, or None when total is zero.
The result is not clamped: a part larger than total gives more than 100.
Import
Section titled “Import”Cargo feature number (enabled by default). To compile only this module:
or in Cargo.toml:
Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
part | f64 | The quantity to express as a percentage. |
total | f64 | The whole that part is a share of. |
Returns
Section titled “Returns”Option<f64>
