is there a way to change the round number to the tenths place?
Offline
dariusz1221 wrote:
is there a way to change the round number to the tenths place?
This will round off to the nearest tenths:
set [number v] to <THE NUMBER YOU WANT> set [var num v] to (((number) - ((number) mod (10))) / (10)) change [var num v] by ((number) mod (10)) set [var num v] to (round (var num))I didn't want to overcomplicate the script and give myself a headache, so there.
Last edited by jontmy00 (2012-12-23 02:08:16)
Offline
so a sprite rounds up to the nearest tenths place
Offline
jontmy00 will this work if i put in a 5 to round to the nearest 5? so like if it 11 will it round to 10 but if sprite gets 13 it will round to 15? i tried 10 and that was 2 far off for my liking.
Offline
maybe i should explain a bit more what im trying to do. i want the user to move some sprites around and if they get with in 5x or 5y position to broadcast.
Offline