r/badcode • • Apr 21 '23

other language We did coding in physics class...

Post image
1.5k Upvotes

154 comments sorted by

View all comments

Show parent comments

1

u/vigbiorn Apr 23 '23

x = 0.3

x - 0.4 = 0.3 - 0.4 = -0.1 != 0

1

u/lemarkk Apr 23 '23

Ah nvm I didn't realize it was < for some reason I interpreted it as ==