Skip to content

Commit

Permalink
Merge pull request #521 from Sergio0694/dev/fix-double-uses
Browse files Browse the repository at this point in the history
Remove double uses in MengerJourney/TwoTiledTruchet
  • Loading branch information
Sergio0694 committed May 8, 2023
2 parents eb0a211 + c73abb2 commit b43432e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ static float3 Mod(float3 x, float y)

z = (Scale * z) - (Offset * (Scale - 1.0f));

if (z.Z < -0.5f * Offset.Z * (Scale - 1.0))
if (z.Z < -0.5f * Offset.Z * (Scale - 1.0f))
{
z.Z += Offset.Z * (Scale - 1.0f);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ static float Mod(float x, float y)
ang.Y *= -1.0f;
}

if (rnd3 < .5)
if (rnd3 < 0.5f)
{
d = d.YX;
ang = ang.YX;
Expand All @@ -79,7 +79,7 @@ static float Mod(float x, float y)
}
else
{
if (rnd < .5)
if (rnd < 0.5f)
{
p = p.YX * new float2(1, -1);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ static float3 Mod(float3 x, float y)

z = (Scale * z) - (Offset * (Scale - 1.0f));

if (z.Z < -0.5f * Offset.Z * (Scale - 1.0))
if (z.Z < -0.5f * Offset.Z * (Scale - 1.0f))
{
z.Z += Offset.Z * (Scale - 1.0f);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ static float Mod(float x, float y)
ang.Y *= -1.0f;
}

if (rnd3 < .5)
if (rnd3 < 0.5f)
{
d = d.YX;
ang = ang.YX;
Expand All @@ -72,7 +72,7 @@ static float Mod(float x, float y)
}
else
{
if (rnd < .5)
if (rnd < 0.5f)
{
p = p.YX * new float2(1, -1);
}
Expand Down

0 comments on commit b43432e

Please sign in to comment.