From f095df99c99cd4fdf81b862d832a4186cec4aec6 Mon Sep 17 00:00:00 2001 From: Person Date: Thu, 20 Jun 2019 16:29:17 -0700 Subject: [PATCH] --Code changes -Change two if statements into an if/else if in Truchet_hex_fill. --- Source/Ember/Variations07.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Source/Ember/Variations07.h b/Source/Ember/Variations07.h index 607604d..dafc4e2 100644 --- a/Source/Ember/Variations07.h +++ b/Source/Ember/Variations07.h @@ -1506,10 +1506,11 @@ public: bool add = true; if (m_Seed == 1) + { if (!(int(rx) & 1) && !(int(rz) & 1)) add = false; - - if (m_Seed >= 2) + } + else if (m_Seed >= 2) { T hash_f = std::sin(FX_h * T(12.9898) + FY_h * T(78.233) + m_Seed) * T(43758.5453); hash_f = hash_f - Floor(hash_f); @@ -1581,10 +1582,11 @@ public: << "\t\tbool add = true;\n" << "\n" << "\t\tif (" << seed << " == 1)\n" + << "\t\t{\n" << "\t\t if (!((int)rx & 1) && !((int)rz & 1))\n" << "\t\t add = false;\n" - << "\n" - << "\t\tif (" << seed << " >= 2)\n" + << "\t\t}\n" + << "\t\telse if (" << seed << " >= 2)\n" << "\t\t{\n" << "\t\t real_t hash_f = sin(fma(FX_h, (real_t)(12.9898), fma(FY_h, (real_t)(78.233), " << seed << "))) * (real_t)(43758.5453);\n" << "\t\t hash_f = hash_f - floor(hash_f);\n"