Changed formula by moving some pieces around

instead of totalWidth - (width * positionNum), to changed to (width *
positionNum) - totalWidth. Was getting a negative number.
workspace file / idea folder