Posts: 482
Threads: 84
Joined: Nov 2010
Reputation:
0
how would i convert a float to 1.decimal places if the float is 1000 or more
e.g
1000 - 1.points
2000 - 2.etc
3000 - 3.etc
Posts: 482
Threads: 84
Joined: Nov 2010
Reputation:
0
not 1 decimal place, 1 before the decimal
Posts: 1,363
Threads: 14
Joined: Apr 2009
Reputation:
0
I think I understand, but maybe not
try using this and then rounding it off.
(x - (x - 1000)/10)+100
so if x = 1129 it'd be 112
Posts: 482
Threads: 84
Joined: Nov 2010
Reputation:
0
but if i round it off it'll become an integer? i want it like 1.54 km if that explains it better lol
Posts: 1,363
Threads: 14
Joined: Apr 2009
Reputation:
0
oh so instead of say 1928 you want it to be 1.928? if it's greater than 1000 then just divide by 1000
new Float:MyFloat;
MyFloat = MyDecimal/1000;