code: public double intersectZ(double z)
  	{
  		if (direction.z == 0)
  			return Double.NaN;
  		return (z - origin.z) / direction.z;
  	}
docs: Gets the distance to the plane at z.
  
  @param z the z plane
  @return the distance