iMr.WiFi..! Posted August 23, 2017 Posted August 23, 2017 hello , i have question about "%" on coding .. I use it sometimes but i didn't understand Its usefulness .. anyone can explain me what is its usefulness ? 1
MTA Team Lpsd Posted August 23, 2017 MTA Team Posted August 23, 2017 % is modulo. It gives you the remainder from a division 2 % 1 = 0 3 % 2 = 1 50 % 23 = 4 and so on
iMr.WiFi..! Posted August 23, 2017 Author Posted August 23, 2017 25 minutes ago, LopSided_ said: % is modulo. It gives you the remainder from a division 2 % 1 = 0 3 % 2 = 1 50 % 23 = 4 and so on i understand it before your comment, however thanks for helping ..
Moderators IIYAMA Posted August 24, 2017 Moderators Posted August 24, 2017 It is very useful for repeating (dx) animations. local duration = 4000 -- ms local progress = getTickCount() % duration / duration -- progress 0 t/m 1 3
iMr.WiFi..! Posted August 25, 2017 Author Posted August 25, 2017 10 hours ago, IIYAMA said: It is very useful for repeating (dx) animations. local duration = 4000 -- ms local progress = getTickCount() % duration / duration -- progress 0 t/m 1 Good example, wow !
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now