Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to name value with range of 0.0 to 1.0?

Tags:

math

naming

Quite often I use values between 0.0 and 1.0 to hold progress, or transparancy, or other things that can go from none to full. A percentage if you will.

I don't want to call it a percentage because it is not expressed as a value from 0 to 100.

To give my variables a clear name, I still would like to describe this kind of value.

What would be an appropriate name?

like image 898
Joris van Liempd iDeveloper Avatar asked Dec 29 '15 16:12

Joris van Liempd iDeveloper


People also ask

What is a range between 0 and 1 called?

The closed range between [0,1] is typically called the closed unit interval. If you do not include the endpoints it would be the open unit interval.

Which function returns the value from 0.0 to 1.0 in between?

random() method returns a random float number between 0.0 to 1.0. The function doesn't need any arguments.

How do you convert a range of values to another range?

To convert a number range to another range, maintaining the ratio the simple way would be use linear conversion.

How do you write out the range?

Use en dash (not hyphen or em dash) with no spaces either side. Use all the digits (so no elision) if at least one number in the range is from 1 to 100, e.g. 2–10, 67–69, 82–323. For multiples of 100, use all the digits, e.g. 100–107, 300–329, 2,200–2,254.


1 Answers

That is called a normalized value.

like image 183
Ignacio Vazquez-Abrams Avatar answered Oct 13 '22 01:10

Ignacio Vazquez-Abrams