From e328a1d560b7924084b7a45160a75f2a0d3a6e27 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Mon, 5 Apr 2010 21:37:01 -0400 Subject: New dmnsn_vector_min() and _max() functions. --- libdimension/bvst.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'libdimension/bvst.c') diff --git a/libdimension/bvst.c b/libdimension/bvst.c index c3c8d9d..d361215 100644 --- a/libdimension/bvst.c +++ b/libdimension/bvst.c @@ -202,13 +202,8 @@ static void dmnsn_bvst_node_swallow(dmnsn_bvst_node *node, dmnsn_vector min, dmnsn_vector max) { - if (node->min.x > min.x) node->min.x = min.x; - if (node->min.y > min.y) node->min.y = min.y; - if (node->min.z > min.z) node->min.z = min.z; - - if (node->max.x < max.x) node->max.x = max.x; - if (node->max.y < max.y) node->max.y = max.y; - if (node->max.z < max.z) node->max.z = max.z; + node->min = dmnsn_vector_min(node->min, min); + node->max = dmnsn_vector_max(node->max, max); } /* Tree rotations */ -- cgit v1.2.3