Added float cast to viewport size

Added float cast to remove compiler warnings.