Hello im having a problem with my flash file. I have a value where when u press a button it raise by 0.2 but when i have raised it 3 times so it equals 0.6 but when i put the variable inside a text box it shows the following (times i have raised the value by clicking the button):
1: 0.2
2: 0.4
3: 0.6000000000000000
4: 0.8
5: 1
6: 1.2
7: 1.4
8: 1.5999999999999999
so for some reason it dosent raise by 0.2 or it do but not all the time... so can anyone help me how to set the max length of a value or how to fix this? so it raise by 0.2 every time :)
my code for the button:
shop_1.addEventListener(MouseEvent.MOUSE_UP,shop_1_c);
function shop_1_c(e:MouseEvent){
if(ep >= 25){
ep_per_second = ep_per_second+0.2;
ep = ep-25;
}