]> git.mxchange.org Git - simgear.git/commitdiff
No round function for MSVC (forgot the template argument)
authorFrederic Bouvier <fredfgfs01@free.fr>
Wed, 25 Apr 2012 06:59:04 +0000 (08:59 +0200)
committerFrederic Bouvier <fredfgfs01@free.fr>
Wed, 25 Apr 2012 06:59:04 +0000 (08:59 +0200)
simgear/scene/tgdb/obj.cxx

index c67192d9dd26a90ba6d206b9c4cb24104f740239..29b78fba0ad219e92c4035fbbfe1de1ec156c2f7 100644 (file)
@@ -572,7 +572,7 @@ struct SGTileGeometryBin {
             buildingtype = SGBuildingBin::SMALL;
             width = mat->get_building_small_min_width() + mt_rand(&seed) * mt_rand(&seed) * (mat->get_building_small_max_width() - mat->get_building_small_min_width());
             depth = mat->get_building_small_min_depth() + mt_rand(&seed) * mt_rand(&seed) * (mat->get_building_small_max_depth() - mat->get_building_small_min_depth());
-            floors = SGMisc::round(mat->get_building_small_min_floors() + mt_rand(&seed) * (mat->get_building_small_max_floors() - mat->get_building_small_min_floors()));
+            floors = SGMisc<double>::round(mat->get_building_small_min_floors() + mt_rand(&seed) * (mat->get_building_small_max_floors() - mat->get_building_small_min_floors()));
             height = floors * (2.8 + mt_rand(&seed));
             
             if (depth > width) { depth = width; }
@@ -582,14 +582,14 @@ struct SGTileGeometryBin {
             buildingtype = SGBuildingBin::MEDIUM;
             width = mat->get_building_medium_min_width() + mt_rand(&seed) * mt_rand(&seed) * (mat->get_building_medium_max_width() - mat->get_building_medium_min_width());
             depth = mat->get_building_medium_min_depth() + mt_rand(&seed) * mt_rand(&seed) * (mat->get_building_medium_max_depth() - mat->get_building_medium_min_depth());
-            floors = SGMisc::round(mat->get_building_medium_min_floors() + mt_rand(&seed) * (mat->get_building_medium_max_floors() - mat->get_building_medium_min_floors()));
+            floors = SGMisc<double>::round(mat->get_building_medium_min_floors() + mt_rand(&seed) * (mat->get_building_medium_max_floors() - mat->get_building_medium_min_floors()));
             height = floors * (2.8 + mt_rand(&seed));
             pitched = (mt_rand(&seed) < mat->get_building_medium_pitch());         
           } else {
             buildingtype = SGBuildingBin::LARGE;
             width = mat->get_building_large_min_width() + mt_rand(&seed) * (mat->get_building_large_max_width() - mat->get_building_large_min_width());
             depth = mat->get_building_large_min_depth() + mt_rand(&seed) * (mat->get_building_large_max_depth() - mat->get_building_large_min_depth());
-            floors = SGMisc::round(mat->get_building_large_min_floors() + mt_rand(&seed) * (mat->get_building_large_max_floors() - mat->get_building_large_min_floors())); 
+            floors = SGMisc<double>::round(mat->get_building_large_min_floors() + mt_rand(&seed) * (mat->get_building_large_max_floors() - mat->get_building_large_min_floors())); 
             height = floors * (2.8 + mt_rand(&seed));
             pitched = (mt_rand(&seed) < mat->get_building_large_pitch());                   
           }