diff options
author | Tavian Barnes <tavianator@gmail.com> | 2009-10-07 23:00:20 +0000 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2009-10-07 23:00:20 +0000 |
commit | c7d53c4e6ac03d04ecc88d36bb426d6756cf5994 (patch) | |
tree | b9fab1e3832b2a51252e80f074bf253340d5292f | |
parent | 4bd6e26bf3442a1e94bc8d689c258c0b22b85c0f (diff) | |
download | dimension-c7d53c4e6ac03d04ecc88d36bb426d6756cf5994.tar.xz |
Typo fixes in kD_splay_tree.c.
-rw-r--r-- | libdimension/kD_splay_tree.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libdimension/kD_splay_tree.c b/libdimension/kD_splay_tree.c index 25ed1c4..9243dbc 100644 --- a/libdimension/kD_splay_tree.c +++ b/libdimension/kD_splay_tree.c @@ -296,6 +296,9 @@ dmnsn_kD_splay_search(dmnsn_kD_splay_node *root, dmnsn_line ray) return result.intersection; } +static double dmnsn_ray_box_intersection(dmnsn_line ray, + dmnsn_vector min, dmnsn_vector max); + static dmnsn_kD_splay_search_result dmnsn_kD_splay_search_recursive(dmnsn_kD_splay_node *node, dmnsn_line ray, double t) @@ -326,7 +329,7 @@ dmnsn_kD_splay_search_recursive(dmnsn_kD_splay_node *node, dmnsn_line ray, * closer than `t'. */ t_temp = dmnsn_ray_box_intersection(ray, node->min, node->max); - search_left = t_temp >= 0.0 && (t < 0.0 || t_temp < t) + search_left = t_temp >= 0.0 && (t < 0.0 || t_temp < t); } if (search_left) { @@ -344,7 +347,7 @@ dmnsn_kD_splay_search_recursive(dmnsn_kD_splay_node *node, dmnsn_line ray, test_object = 1; } else { t_temp = dmnsn_ray_box_intersection(ray, node->min, node->max); - test_object = t_temp >= 0.0 && (t < 0.0 || t_temp < t) + test_object = t_temp >= 0.0 && (t < 0.0 || t_temp < t); } if (test_object) { @@ -370,7 +373,7 @@ dmnsn_kD_splay_search_recursive(dmnsn_kD_splay_node *node, dmnsn_line ray, if (result.intersection) dmnsn_delete_intersection(result.intersection); result = result_temp; - t = result->intersection->t; + t = result.intersection->t; } else { dmnsn_delete_intersection(result_temp.intersection); } @@ -384,7 +387,7 @@ dmnsn_kD_splay_search_recursive(dmnsn_kD_splay_node *node, dmnsn_line ray, if (result.intersection) dmnsn_delete_intersection(result.intersection); result = result_temp; - t = result->intersection->t; + t = result.intersection->t; } else { dmnsn_delete_intersection(result_temp.intersection); } @@ -393,11 +396,8 @@ dmnsn_kD_splay_search_recursive(dmnsn_kD_splay_node *node, dmnsn_line ray, return result; } -static double dmnsn_ray_box_intersection(dmnsn_line ray, - dmnsn_vector min, dmnsn_vector max); - static double -dmnsn_ray_box_intersection(dmnsn_line ray, dmnsn_vector min, dmnsn_vector max) +dmnsn_ray_box_intersection(dmnsn_line line, dmnsn_vector min, dmnsn_vector max) { double t = -1.0, t_temp; dmnsn_vector p; |