Skip to content

Commit

Permalink
[CodeFactor] Apply fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
code-factor committed Nov 15, 2024
1 parent 18a5cf4 commit a22a315
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ public TestSceneFanChevronVisual() : base(1, 2)
float progress = (i + 2f) / 12f;

float scale = progress - (2f / 12);
var middlePosition = lineStart + middleLineDelta * progress;
var middlePosition = lineStart + (middleLineDelta * progress);

float t = 6.5f + 2.5f * scale;
float t = 6.5f + (2.5f * scale);

float chevWidth = MathF.Abs(lineStart.X - middlePosition.X);

Expand All @@ -85,7 +85,7 @@ public TestSceneFanChevronVisual() : base(1, 2)
Vector2 one = new Vector2(chevWidth, 0);

var middle = (one + secondPoint) * 0.5f;
float h = (middle - Vector2.Zero).Length + t * 3;
float h = (middle - Vector2.Zero).Length + (t * 3);

float w = (secondPoint - one).Length;

Expand Down Expand Up @@ -114,5 +114,4 @@ protected override void LoadComplete()
slide.Path = SlidePaths.CreateSlidePath(new SlideBodyPart(SlidePaths.PathShapes.Fan, 4, false));
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ public SlideChevron()
Anchor = Anchor.Centre;
Origin = Anchor.Centre;
Size = new Vector2(80, 60);

}

[BackgroundDependencyLoader]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,12 @@ private void tryCreateFanChevrons()

for (int i = 0; i < 11; ++i)
{

float progress = (i + 2f) / 12f;

float scale = progress - (1f) / 12f;
var middlePosition = lineStart + middleLineDelta * progress;
float scale = progress - ((1f) / 12f);
var middlePosition = lineStart + (middleLineDelta * progress);

float t = 6.5f + 2.5f * scale;
float t = 6.5f + (2.5f * scale);

float chevWidth = MathF.Abs(lineStart.X - middlePosition.X) - t;

Expand All @@ -162,7 +161,7 @@ private void tryCreateFanChevrons()
Vector2 one = new Vector2(chevWidth, 0);

var middle = (one + secondPoint) * 0.5f;
float h = (middle - Vector2.Zero).Length + t * 3;
float h = (middle - Vector2.Zero).Length + (t * 3);

float w = (secondPoint - one).Length;

Expand Down

0 comments on commit a22a315

Please sign in to comment.