Skip to content

Commit

Permalink
remove -1, it was not necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
tomlm committed Oct 30, 2024
1 parent 2c28b9e commit 56daa77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Consolonia.Core/Drawing/ConsoleBrush.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ public static ConsoleBrush FromPosition(IBrush brush, int x, int y, int width, i
case IConicGradientBrush conicBrush:
{
// Calculate the relative position within the gradient
double horizontalRelativePosition = (double)x / (width - 1);
double verticalRelativePosition = (double)y / (height - 1);
double horizontalRelativePosition = (double)x / width;
double verticalRelativePosition = (double)y / height;

// Interpolate horizontal and vertical colors
var horizontalColor = InterpolateColor(conicBrush, horizontalRelativePosition);
Expand Down

0 comments on commit 56daa77

Please sign in to comment.