Added distance calculation utils for vec