Answer:
It depends. The rectangular floor has 2 different diagonals, the small one and the large one.
Explanation:
If the bug walks the small diaognal, it will walk 10 tiles from corner to corner. If the bug walk the large diagonal, it will walk 17 tiles from corner to corner