Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How comes my computer calculate into this?
#2
Ew, basing a "My First RPG" on MapleStory.

Looks like a Double rounding error. It's doing it right - 0.9 - (0.5 * (3-1)) = -0.1, but it's storing it as -0.09999999 because of the way computers handle floating point numbers. Make sure you are using a Double instead of a Float.
Reply


Messages In This Thread
How comes my computer calculate into this? - by Dusk - 2011-06-19, 11:35 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)