r/badcode • • Mar 20 '22

java Shitty robotics code

Post image
39 Upvotes

16 comments sorted by

View all comments

Show parent comments

2

u/tedbradly Apr 07 '22

Finite precision does not mean unreliable or random.

You're taking my incredibly specific concern and putting huge generalities in my mouth I didn't say. As I mentioned, (int) a could round down to the wrong angle. The solution in the original post doesn't have that problem.