File tree 2 files changed +12
-4
lines changed
2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -36,11 +36,15 @@ public double MultiplyValue
36
36
37
37
protected override void OnUpdate ( )
38
38
{
39
- if ( Progress < Minimum )
39
+ if ( Progress < Minimum ) {
40
+ Target . SetValue ( TargetProperty , From * MultiplyValue ) ;
40
41
return ;
42
+ }
41
43
42
- if ( Progress >= Maximum )
44
+ if ( Progress >= Maximum ) {
45
+ Target . SetValue ( TargetProperty , To * MultiplyValue ) ;
43
46
return ;
47
+ }
44
48
45
49
//Formula Used
46
50
//Y = ((X - X1)*(Y2 - Y1) / (X2 - X1)) + Y1
Original file line number Diff line number Diff line change @@ -26,11 +26,15 @@ public int To
26
26
27
27
protected override void OnUpdate ( )
28
28
{
29
- if ( Progress < Minimum )
29
+ if ( Progress < Minimum ) {
30
+ Target . SetValue ( TargetProperty , From ) ;
30
31
return ;
32
+ }
31
33
32
- if ( Progress >= Maximum )
34
+ if ( Progress >= Maximum ) {
35
+ Target . SetValue ( TargetProperty , To ) ;
33
36
return ;
37
+ }
34
38
35
39
int ? value = ( int ) ( ( ( Progress - Minimum ) * ( To - From ) / ( Maximum - Minimum ) ) + From ) ;
36
40
You can’t perform that action at this time.
0 commit comments