Small refactoring in T.utils.getRect