How to test if a double is an integer October 18, 2022 by Tarik Or you could use the modulo operator: (d % 1) == 0