Przeglądaj źródła

Fixing issue 3500, invalid outer cone angle readed from gltf2 file on machines which defines M_PI as a double value

Jean-François Verdon 4 lat temu
rodzic
commit
09ca11d063
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      code/AssetLib/glTF2/glTF2Asset.inl

+ 1 - 1
code/AssetLib/glTF2/glTF2Asset.inl

@@ -1230,7 +1230,7 @@ inline void Light::Read(Value &obj, Asset & /*r*/) {
         Value *spot = FindObject(obj, "spot");
         if (!spot) throw DeadlyImportError("GLTF: Light missing its spot parameters");
         innerConeAngle = MemberOrDefault(*spot, "innerConeAngle", 0.0f);
-        outerConeAngle = MemberOrDefault(*spot, "outerConeAngle", M_PI / 4.0f);
+        outerConeAngle = MemberOrDefault(*spot, "outerConeAngle", static_cast<float>(M_PI / 4.0f));
     }
 }