From 56daa7739d3a3f860cb68b3e51322fdd44a712cd Mon Sep 17 00:00:00 2001 From: Tom Laird-McConnell Date: Wed, 30 Oct 2024 14:43:57 -0700 Subject: [PATCH] remove -1, it was not necessary --- src/Consolonia.Core/Drawing/ConsoleBrush.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Consolonia.Core/Drawing/ConsoleBrush.cs b/src/Consolonia.Core/Drawing/ConsoleBrush.cs index 46c5b6ef..7a19aff7 100644 --- a/src/Consolonia.Core/Drawing/ConsoleBrush.cs +++ b/src/Consolonia.Core/Drawing/ConsoleBrush.cs @@ -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);