Floating Point Numbers
Always write the entirety of floating point numbers, including the integer part.
float time = 0.5f;
double preciseTime = 0.5d;
decimal veryPreciseTime = 0.5m;
Do not start float values with a period.
// DON'T DO THIS
float time = .5f;
double preciseTime = .5d;
decimal veryPreciseTime = .5m;
Last updated