move remaining functions from kuhl-util to vecmat