I'm having trouble in a condition i want in a if statement. I want to check if a variable(float type), like 0.9, is multiple of 0.1.
I had this code:
(t * dt) % 0.1 == 0
I've tried the modulo operator but gave me inaccurate results. For example 0.3 is not a multiple of 0.1. Can you help me?