Find centre of mass (one‑dimensional) (#583)