r/shittyprogramming • • Jul 23 '18

r/badcode how do I math?

https://imgur.com/0ysm4wG
39 Upvotes

8 comments sorted by

View all comments

Show parent comment

21

u/Mildan Jul 23 '18

Pretty much, it's a rounding technique to remove trailing digits, or digits altogether.

For example 18/5 *5 would equal 15 when done with integers, not 18.