code_junkie

C# float bug 0.1 - 0.1 = 1.490116E-08

Nov 13th, 2011
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. Console.WriteLine("hit! " + Users[targetNum].character.health + " : " + player.character.profile.attackPower);
  2.  
  3. Users[targetNum].character.health -= player.character.profile.attackPower;
  4.  
  5. Console.WriteLine("health! " + Users[targetNum].character.health);
  6.  
  7. hit! 0.1 : 0.1
  8. health! 1.490116E-08
  9.  
  10. if (Users[targetNum].character.health <= 0.00001)
Add Comment
Please, Sign In to add comment