Initialize nearest_t to 1e8
This commit is contained in:
parent
d9d27e2d22
commit
4407f757e6
1 changed files with 1 additions and 1 deletions
|
@ -152,7 +152,7 @@ scene_trace_ray(Scene *scene, const Ray ray, const int depth)
|
||||||
// Find intersections of this ray with objects in the scene.
|
// Find intersections of this ray with objects in the scene.
|
||||||
Object *intersected_obj = NULL;
|
Object *intersected_obj = NULL;
|
||||||
float *t = NULL;
|
float *t = NULL;
|
||||||
float nearest_t;
|
float nearest_t = 1e8;
|
||||||
int nints;
|
int nints;
|
||||||
ObjectList *ptr = scene->objects;
|
ObjectList *ptr = scene->objects;
|
||||||
while (ptr != NULL) {
|
while (ptr != NULL) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue