Any particular reason you aren't using either Point3D::angleTo() or Point3D::signedAngleTo() here?