From 30851b796faaac0bd7fcb74974a06dd411784a3a Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Wed, 27 Nov 2019 17:18:12 +0100 Subject: [PATCH] Update glTF2Importer.cpp Make them const --- code/glTF2/glTF2Importer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/glTF2/glTF2Importer.cpp b/code/glTF2/glTF2Importer.cpp index 1868ec119..dd80aeba9 100644 --- a/code/glTF2/glTF2Importer.cpp +++ b/code/glTF2/glTF2Importer.cpp @@ -214,8 +214,8 @@ inline void SetMaterialTextureProperty(std::vector &embeddedTexIdxs, Asset // texture origin. All three can be corrected for solely by a change of the translation since // the transformations available are shape preserving. Note the importer already flips the V // coordinate of the actual meshes during import. - ai_real rcos(cos(-transform.mRotation)); - ai_real rsin(sin(-transform.mRotation)); + const ai_real rcos(cos(-transform.mRotation)); + const ai_real rsin(sin(-transform.mRotation)); transform.mTranslation.x = (0.5 * transform.mScaling.x) * (-rcos + rsin + 1) + prop.TextureTransformExt_t.offset[0]; transform.mTranslation.y = ((0.5 * transform.mScaling.y) * (rsin + rcos - 1)) + 1 - transform.mScaling.y - prop.TextureTransformExt_t.offset[1];;