Navigation
Synopsis Compute the ratio between two numbers as a percentage.
Function int percent(num part, num whole)
Usage import util::Math;
Examples
rascal>import util::Math;
ok
rascal>percent(1r4, 1);
int: 30
rascal>percent(13,250);
int: 5
rascal>percent(80.0,160.0);
int: 50
Is this page unclear, or have you spotted an error? Please add a comment below and help us to improve it. For all other questions and remarks, visit ask.rascal-mpl.org.