From: Perttu Ahola Date: Mon, 28 Nov 2011 19:50:14 +0000 (+0200) Subject: Silly MSVC doesn't know how to handle type conversions for parameters of pow(). Help it. X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=fe64f2b673d985d2842991014af0ba085eaf27db;p=zefram%2Fminetest%2Fminetest_engine.git Silly MSVC doesn't know how to handle type conversions for parameters of pow(). Help it. --- diff --git a/src/environment.cpp b/src/environment.cpp index ce25b0fe..1951996a 100644 --- a/src/environment.cpp +++ b/src/environment.cpp @@ -592,7 +592,7 @@ public: float chance = abm->getTriggerChance(); if(chance == 0) chance = 1; - aabm.chance = 1.0 / pow(1.0 / chance, intervals); + aabm.chance = 1.0 / pow((float)1.0/chance, (float)intervals); if(aabm.chance == 0) aabm.chance = 1; std::set contents_s = abm->getTriggerContents();