How to Tell if a Ray Hit Something in OptiX Prime?

I have been using OptiX Prime lately, and I just got finished putting together my CUDA kernels to generate rays. Now that I have the rays being generated, I need to process the hits. However, I couldn’t find anything in the OptiX Prime docs about what determines if a ray hit something. I have been stepping through the hit buffer returned, and it appears that the numbers are all over the place. I originally thought that the rays which didn’t hit anything would return 0, but there are all sorts of very small and large negative and positive numbers. Could someone please clarify what the value returned in the hit buffer is?

I’m using the RTP_QUERY_TYPE_CLOSEST query type with the RTP_BUFFER_FORMAT_RAY_ORIGIN_TMIN_DIRECTION_TMAX ray type and the RTP_BUFFER_FORMAT_HIT_T hit buffer type. The ray and hit structs are below:

struct Hit 
{
        float t;
};

struct Ray
{
	static const RTPbufferformat format = RTP_BUFFER_FORMAT_RAY_ORIGIN_TMIN_DIRECTION_TMAX;

	float3 origin;
	float  tmin;
	float3 dir;
	float  tmax;
};

That’s explained inside the OptiX API Reference documentation on RTP_BUFFER_FORMAT_HIT_* types:

RTP_BUFFER_FORMAT_HIT_BITMASK one bit per ray 0=miss, 1=hit
RTP_BUFFER_FORMAT_HIT_T float:ray distance (t < 0 for miss)
RTP_BUFFER_FORMAT_HIT_T_TRIID float:ray distance (t < 0 for miss), int:triangle id
RTP_BUFFER_FORMAT_HIT_T_TRIID_U_V float:ray distance (t < 0 for miss), int:triangle id, float2:barycentric coordinates u,v (w=1-u-v)

Thanks for the clarification. I must have missed it while reading the docs.