What does the dot after integers in some calculations do?

variable = (255./1023.) * (756./reading);


It’s a shorthand for “1023.0” etc

It instructs the compiler to handle the "integer" is a floating point value.

Those aren't integers. :slight_smile:

They are floating-point constants because they contain a decimal point. If you want a floating-point result from a division then one of the easy ways is to make the numerator or denominator (or both) floating-point.


    float x = 1 / 2;
    float y = 1.0 / 2;

Ok, I see, it renders the preceding number a float. Thanks!