aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Barron <barronpm@gmail.com>2020-07-19 14:13:56 -0400
committerPatrick Barron <barronpm@gmail.com>2020-07-19 14:13:56 -0400
commit87b8a8d7c76e7b59651a7436e895d64c5001de4b (patch)
tree6cc970ee89396d32a614b40068b95d59ae3b62e9
parentbd77f1e84ffad72ccf78231181f392a6948f58a7 (diff)
Simplify arithmetic
-rw-r--r--Jellyfin.Drawing.Skia/PercentPlayedDrawer.cs4
1 files changed, 1 insertions, 3 deletions
diff --git a/Jellyfin.Drawing.Skia/PercentPlayedDrawer.cs b/Jellyfin.Drawing.Skia/PercentPlayedDrawer.cs
index ae9d4e0c4..6136a2ff9 100644
--- a/Jellyfin.Drawing.Skia/PercentPlayedDrawer.cs
+++ b/Jellyfin.Drawing.Skia/PercentPlayedDrawer.cs
@@ -27,9 +27,7 @@ namespace Jellyfin.Drawing.Skia
paint.Style = SKPaintStyle.Fill;
canvas.DrawRect(SKRect.Create(0, (float)endY - IndicatorHeight, endX, endY), paint);
- double foregroundWidth = endX;
- foregroundWidth *= percent;
- foregroundWidth /= 100;
+ double foregroundWidth = (endX * percent) / 100;
paint.Color = SKColor.Parse("#FF00A4DC");
canvas.DrawRect(SKRect.Create(0, (float)endY - IndicatorHeight, Convert.ToInt32(foregroundWidth), endY), paint);