 			v21 = v31;
 			v22 = v32;
 			n = cross((v1 - v0) , (v3 - v0));
-			if(isnan(n.x)){printf("NAN4\n");}
 			continue;
 		}
 		// If origin is outside (v3,v0,v2), then eliminate v1 and loop


	// Determine whether origin is on + or - side of plane (v1,v0,v2)
	n = normalize(cross((v1 - v0) , (v2 - v0)));
	//if(isnan(n.x)){printf("NAN3\n");}
	// If the origin is on the - side of the plane, reverse the direction of the plane
	if (dot(n , v0) > 0){
		Swap(v1, v2);

		Swap(v12, v22);
		n = -n;
	}
	// Phase One: Identify a portal
	float3 v31, v32, v3;
	while (1){
