Find the magnitude of a three-dimensional vector