Skip to content

Commit 2ceaf28

Browse files
committed
Use GenrateForumla name for fn
1 parent 354a7bf commit 2ceaf28

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Microsoft.Toolkit.Uwp.UI.Controls/TileControl/TileControl.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ private void CreateModuloExpression(ScrollViewer scrollViewer, double imageWidth
470470
expressionX.SetReferenceParameter(propSetParam, propertySetModulo);
471471
expressionY.SetReferenceParameter(propSetParam, propertySetModulo);
472472

473-
string Thing(string common, string dimension)
473+
string GenerateFormula(string common, string dimension)
474474
=> string.Format(
475475
"{0} == 0 " +
476476
"? 0 " +
@@ -485,9 +485,9 @@ string Thing(string common, string dimension)
485485
if (scrollViewer == null)
486486
{
487487
// expressions are created to simulate a positive and negative modulo with the size of the image and the offset
488-
expressionXVal = Thing("Ceil(" + qualifiedOffsetXParam + ")", qualifiedImageHeightParam);
488+
expressionXVal = GenerateFormula("Ceil(" + qualifiedOffsetXParam + ")", qualifiedImageHeightParam);
489489

490-
expressionYVal = Thing("Ceil(" + qualifiedOffsetYParam + ")", qualifiedImageWidthParam);
490+
expressionYVal = GenerateFormula("Ceil(" + qualifiedOffsetYParam + ")", qualifiedImageWidthParam);
491491
}
492492
else
493493
{
@@ -500,12 +500,12 @@ string Thing(string common, string dimension)
500500
expressionX.SetReferenceParameter(scrollParam, scrollProperties);
501501
expressionY.SetReferenceParameter(scrollParam, scrollProperties);
502502

503-
string LocalThing(string scrollTranslation, string speed, string offset, string dimension)
504-
=> Thing(string.Format("Ceil(({0} * {1}) + {2})", scrollTranslation, speed, offset), dimension);
503+
string GenerateParalaxFormula(string scrollTranslation, string speed, string offset, string dimension)
504+
=> GenerateFormula(string.Format("Ceil(({0} * {1}) + {2})", scrollTranslation, speed, offset), dimension);
505505

506-
expressionXVal = LocalThing(translationParam + "." + nameof(scrollViewer.Translation.X), qualifiedSpeedParam, qualifiedOffsetXParam, qualifiedImageWidthParam);
506+
expressionXVal = GenerateParalaxFormula(translationParam + "." + nameof(scrollViewer.Translation.X), qualifiedSpeedParam, qualifiedOffsetXParam, qualifiedImageWidthParam);
507507

508-
expressionYVal = LocalThing(translationParam + "." + nameof(scrollViewer.Translation.Y), qualifiedSpeedParam, qualifiedOffsetYParam, qualifiedImageHeightParam);
508+
expressionYVal = GenerateParalaxFormula(translationParam + "." + nameof(scrollViewer.Translation.Y), qualifiedSpeedParam, qualifiedOffsetYParam, qualifiedImageHeightParam);
509509
}
510510

511511
if (scrollOrientation == ScrollOrientation.Horizontal || scrollOrientation == ScrollOrientation.Both)

0 commit comments

Comments
 (0)