Skip to content

Commit

Permalink
Correctly name multiple of two padding methods;
Browse files Browse the repository at this point in the history
  • Loading branch information
onepiecefreak3 committed Jan 15, 2025
1 parent 399fcb9 commit 7e5af2f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public ISizePaddingConfigurationBuilder To(CreatePaddedSizeDimensionDelegate dim

public ISizePaddingConfigurationBuilder ToPowerOfTwo(int steps = 1)
{
_setDelegate.Invoke(value => SizePadding.MultipleOfTwo(value, steps));
_setDelegate.Invoke(value => SizePadding.PowerOfTwo(value, steps));
return _parent;
}

Expand Down
2 changes: 1 addition & 1 deletion src/lib/Kanvas/Kanvas.Debug.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package >
<metadata>
<id>Kanvas</id>
<version>2.1.5</version>
<version>2.1.6</version>
<description>A library containing image transcodings and quantizations usable in the Kuriimu2 eco-system.</description>

<authors>onepiecefreak;IcySon55</authors>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Kanvas/Kanvas.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package >
<metadata>
<id>Kanvas</id>
<version>2.1.5</version>
<version>2.1.6</version>
<description>A library containing image transcodings and quantizations usable in the Kuriimu2 eco-system.</description>

<authors>onepiecefreak;IcySon55</authors>
Expand Down
4 changes: 2 additions & 2 deletions src/lib/Kanvas/SizePadding.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
public static class SizePadding
{
/// <summary>
/// Rounds up a given value to the next multiple of two.
/// Rounds up a given value to the next power of two.
/// </summary>
/// <param name="value">The value to round up.</param>
/// <param name="steps">The amount of power of two's to round up to.</param>
/// <returns>The rounded up value.</returns>
/// <remarks>Eg. 34 with 1 step is 64, 121 with 2 steps is 256.</remarks>
public static int MultipleOfTwo(int value, int steps)
public static int PowerOfTwo(int value, int steps)
{
return 2 << (int)Math.Log(value - 1, 2) << (steps - 1);
}
Expand Down

0 comments on commit 7e5af2f

Please sign in to comment.