JavaScript percentage calculation functions I am building a calculator and I'm aware of what these functions do.

What I basically want feedback on is: Do I need to comment this or is there sufficient information to ascertain its purpose:

function percentOfValue(percentage, of) {
    return (percentage / 100) * of;
}

function whatPercentOfValue(small, large) {
    return (small / large) * 100
}
Code level comments usually lose their context if not properly maintained. Using self descriptive variable names is a good choice. Appreciate your efforts in keeping the code highly readable.


First method, is trying to get the Percentage value, I would update the method definition to getPercentOfValue(from, percentage).
Second method, is trying to calculate percent rate, I would update the method definition to getPercentRate(newValue, originalValue) to follow the terminology in formula.