@@ -470,7 +470,7 @@ private void CreateModuloExpression(ScrollViewer scrollViewer, double imageWidth
470
470
expressionX . SetReferenceParameter ( propSetParam , propertySetModulo ) ;
471
471
expressionY . SetReferenceParameter ( propSetParam , propertySetModulo ) ;
472
472
473
- string Thing ( string common , string dimension )
473
+ string GenerateFormula ( string common , string dimension )
474
474
=> string . Format (
475
475
"{0} == 0 " +
476
476
"? 0 " +
@@ -485,9 +485,9 @@ string Thing(string common, string dimension)
485
485
if ( scrollViewer == null )
486
486
{
487
487
// 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 ) ;
489
489
490
- expressionYVal = Thing ( "Ceil(" + qualifiedOffsetYParam + ")" , qualifiedImageWidthParam ) ;
490
+ expressionYVal = GenerateFormula ( "Ceil(" + qualifiedOffsetYParam + ")" , qualifiedImageWidthParam ) ;
491
491
}
492
492
else
493
493
{
@@ -500,12 +500,12 @@ string Thing(string common, string dimension)
500
500
expressionX . SetReferenceParameter ( scrollParam , scrollProperties ) ;
501
501
expressionY . SetReferenceParameter ( scrollParam , scrollProperties ) ;
502
502
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 ) ;
505
505
506
- expressionXVal = LocalThing ( translationParam + "." + nameof ( scrollViewer . Translation . X ) , qualifiedSpeedParam , qualifiedOffsetXParam , qualifiedImageWidthParam ) ;
506
+ expressionXVal = GenerateParalaxFormula ( translationParam + "." + nameof ( scrollViewer . Translation . X ) , qualifiedSpeedParam , qualifiedOffsetXParam , qualifiedImageWidthParam ) ;
507
507
508
- expressionYVal = LocalThing ( translationParam + "." + nameof ( scrollViewer . Translation . Y ) , qualifiedSpeedParam , qualifiedOffsetYParam , qualifiedImageHeightParam ) ;
508
+ expressionYVal = GenerateParalaxFormula ( translationParam + "." + nameof ( scrollViewer . Translation . Y ) , qualifiedSpeedParam , qualifiedOffsetYParam , qualifiedImageHeightParam ) ;
509
509
}
510
510
511
511
if ( scrollOrientation == ScrollOrientation . Horizontal || scrollOrientation == ScrollOrientation . Both )
0 commit comments