`-1.` in `(nitems - 1.)` to make sure we don't run into integer division, spaces around minus sign