From c2872bf177eb1b27099f0e2050ed0fc70df389fa Mon Sep 17 00:00:00 2001 From: glax Date: Sat, 20 May 2023 02:23:37 +0200 Subject: [PATCH] cutoff after first decimal --- Tranga/Chapter.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tranga/Chapter.cs b/Tranga/Chapter.cs index 8d734c2..17c21f5 100644 --- a/Tranga/Chapter.cs +++ b/Tranga/Chapter.cs @@ -25,7 +25,7 @@ public struct Chapter { NumberDecimalSeparator = "." }; - decimal orderNumber = Math.Floor(Convert.ToDecimal(volumeNumber) * Convert.ToDecimal(chapterNumber, nfi)); - this.fileName = $"{chapterName} - V{volumeNumber}C{chapterNumber} - {orderNumber.ToString(nfi)}"; + decimal orderNumber = Convert.ToDecimal(volumeNumber) * Convert.ToDecimal(chapterNumber, nfi); + this.fileName = $"{chapterName} - V{volumeNumber}C{chapterNumber} - {decimal.Round(orderNumber, 1).ToString(nfi)}"; } } \ No newline at end of file