star_t* findMax(star_t *array, const int n) { double maxDistance=-1.0; star_t *ret; for(int i=0; i<n; i++) if(maxDistance < distanceToOrigin(array[i])) { maxDistance = distanceToOrigin(array[i]); ret = &array[i]; } return ret; }
//-------------------------------------------------------------------------------------------------- /// Get a point located on the plane //-------------------------------------------------------------------------------------------------- Vec3d Plane::pointInPlane() const { double distToOrigin = distanceToOrigin(); Vec3d point(m_A, m_B, m_C); point *= distToOrigin; return point; }