find the magnitude of displacement.