Welcome, Guest. Please login or register.

Author Topic: while() with float ?  (Read 3043 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline STeADi

  • Newbie
  • *
  • Join Date: Aug 2005
  • Posts: 36
    • Show all replies
Re: while() with float ?
« on: February 17, 2006, 12:04:41 PM »
Hello

First of all you're mixing types.

aa is a float
but you're comparison is against an integer
and you're adding 0.01 which is a double (on a pc at least IIRC)

You get what you want if you change your float to a double (increased accuracy) and your comparison to 1.0.

Hope that helps

STeADi