From d4898f438b8c9b3260c894ccbc7f59961efebf2e Mon Sep 17 00:00:00 2001 From: Jasper Renow-Clarke Date: Mon, 11 Oct 2021 14:25:42 +0100 Subject: [PATCH] Use infinity rather than hard coded values --- obj2js.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/obj2js.php b/obj2js.php index 6fb370c..09ce177 100644 --- a/obj2js.php +++ b/obj2js.php @@ -34,14 +34,14 @@ // Next gather some stats on first pass $num_verts=0; $num_faces=0; -$min_x=9999999; -$max_x=-9999999; -$min_y=9999999; -$max_y=-9999999; -$min_z=9999999; -$max_z=-9999999; -$min_face=9999999; -$max_face=-9999999; +$min_x=INF; +$max_x=-INF; +$min_y=INF; +$max_y=-INF; +$min_z=INF; +$max_z=-INF; +$min_face=INF; +$max_face=-INF; $cur_tex=7; // White $vertices=array();