501.0 is a double. Your code reduces its precision to a float.
There really is no reason to use a float.
Change your variable to a double.
Or make the number a float by adding a trailing f : 501.0f
Type: Posts; User: Norm
501.0 is a double. Your code reduces its precision to a float.
There really is no reason to use a float.
Change your variable to a double.
Or make the number a float by adding a trailing f : 501.0f
You're probably having an issue with integer arithmetic. If variables in an expression are int, the compiler does int arithmethic. For example: 9/5 = 1 or 4/5 = 0
Use floating point numbers in the...