Nevermind, it's not, because p1 isn't necessarily on the surface.  You could use `Ellipsoid.scaleToGeodeticSurface`, though, and it might be a tiny bit more efficient.  You'll have to scale `p2` in my suggestion above as well.