Search code examples
mathpercentageterminology

Naming convention for percentages: 0–1 vs. 0–100 value range?


I'd like to be as clear as possible when naming variables.

A percentage can range from 0 and 100. My public variable only accepts values between 0.0 and 1.0, so naming it a "percentage" can lead to confusion and simply naming it a "value" will not clarify the range limit.

Is there a "percent" equivalent or naming convention for variables representing values that range from 0.0 and 1.0?


Solution

  • 0.0 to 1.0 is percentage as well. You didn't get your definition right, a percentage range from 0% to 100% or from 0.0 to 1.0. It means the same thing, the % means percent = per cent = per hundred.

    The range of 0.0 to 1.0 is normally used in statistics, while the range of 0% to 100% is more found in general life as people can put their mind around it better.