Implemented isInHalfspace in tRay