Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sn4k3/UVtools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'UVtools.Core/Extensions/MathExtensions.cs')
-rw-r--r--UVtools.Core/Extensions/MathExtensions.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/UVtools.Core/Extensions/MathExtensions.cs b/UVtools.Core/Extensions/MathExtensions.cs
index 4bb6c92..f38bc90 100644
--- a/UVtools.Core/Extensions/MathExtensions.cs
+++ b/UVtools.Core/Extensions/MathExtensions.cs
@@ -86,7 +86,7 @@ namespace UVtools.Core.Extensions
var index = valStr.IndexOf('.');
if (index < 0) return 0;
- return (uint) (valStr.Substring(index).Length - 1);
+ return (uint) (valStr[index..].Length - 1);
}
public static uint DecimalDigits(this double val)
@@ -97,7 +97,7 @@ namespace UVtools.Core.Extensions
var index = valStr.IndexOf('.');
if (index < 0) return 0;
- return (uint)(valStr.Substring(index).Length - 1);
+ return (uint)(valStr[index..].Length - 1);
}
public static uint DecimalDigits(this decimal val)
@@ -108,7 +108,7 @@ namespace UVtools.Core.Extensions
var index = valStr.IndexOf('.');
if (index < 0) return 0;
- return (uint)(valStr.Substring(index).Length - 1);
+ return (uint)(valStr[index..].Length - 1);
}
public static bool IsInteger(this float val, float tolerance = 0.0001f) => Math.Abs(val - Math.Floor(val)) < tolerance;