Search:

Type: Posts; User: Norm

Search: Search took 0.13 seconds.

  1. Replies
    5
    Views
    1,242

    Re: issues with a float

    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
  2. Replies
    5
    Views
    1,242

    Re: issues with a float

    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...
Results 1 to 2 of 2