From f074b534e82c782c3918e26718fa47cb035fbd53 Mon Sep 17 00:00:00 2001 From: Taiizor <41683699+Taiizor@users.noreply.github.com> Date: Thu, 1 Jun 2023 14:27:22 +0300 Subject: [PATCH] Infrastructure Preparation 160 --- src/Skylark.DNS/Extension/Domain/DomainExtension.cs | 6 +++--- src/Skylark.DNS/Helper/Converter.cs | 2 +- src/Skylark.Standard/Extension/Browser/BrowserExtension.cs | 4 +--- .../Extension/Temperature/TemperatureExtension.cs | 2 +- src/Skylark.Standard/Helper/Password/PasswordHelper.cs | 6 +++--- src/Skylark/Helper/Skymath.cs | 6 +++--- 6 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/Skylark.DNS/Extension/Domain/DomainExtension.cs b/src/Skylark.DNS/Extension/Domain/DomainExtension.cs index f58a7891..e00c4274 100644 --- a/src/Skylark.DNS/Extension/Domain/DomainExtension.cs +++ b/src/Skylark.DNS/Extension/Domain/DomainExtension.cs @@ -1,12 +1,12 @@ using DCIDQR = DnsClient.IDnsQueryResponse; using DCLC = DnsClient.LookupClient; using DCPDRR = DnsClient.Protocol.DnsResourceRecord; -using SE = Skylark.Exception; -using SEQDT = Skylark.Enum.QueryDomainType; using SDNSHC = Skylark.DNS.Helper.Converter; -using SHL = Skylark.Helper.Length; using SDNSMDDM = Skylark.DNS.Manage.Domain.DomainManage; using SDNSME = Skylark.DNS.Manage.External; +using SE = Skylark.Exception; +using SEQDT = Skylark.Enum.QueryDomainType; +using SHL = Skylark.Helper.Length; using SNIPA = System.Net.IPAddress; using SNIPEP = System.Net.IPEndPoint; diff --git a/src/Skylark.DNS/Helper/Converter.cs b/src/Skylark.DNS/Helper/Converter.cs index f90497ac..11cc7f8a 100644 --- a/src/Skylark.DNS/Helper/Converter.cs +++ b/src/Skylark.DNS/Helper/Converter.cs @@ -1,6 +1,6 @@ using DCQT = DnsClient.QueryType; -using SEQDT = Skylark.Enum.QueryDomainType; using SDNSMDDM = Skylark.DNS.Manage.Domain.DomainManage; +using SEQDT = Skylark.Enum.QueryDomainType; namespace Skylark.DNS.Helper { diff --git a/src/Skylark.Standard/Extension/Browser/BrowserExtension.cs b/src/Skylark.Standard/Extension/Browser/BrowserExtension.cs index 56a9a836..693065ba 100644 --- a/src/Skylark.Standard/Extension/Browser/BrowserExtension.cs +++ b/src/Skylark.Standard/Extension/Browser/BrowserExtension.cs @@ -1,6 +1,4 @@ -using NUglify; -using NUglify.Css; -using WebMarkupMin.Core; +using WebMarkupMin.Core; using E = Skylark.Exception; using HL = Skylark.Helper.Length; using MBBM = Skylark.Standard.Manage.Browser.BrowserManage; diff --git a/src/Skylark.Standard/Extension/Temperature/TemperatureExtension.cs b/src/Skylark.Standard/Extension/Temperature/TemperatureExtension.cs index 17d44cb7..5d477d73 100644 --- a/src/Skylark.Standard/Extension/Temperature/TemperatureExtension.cs +++ b/src/Skylark.Standard/Extension/Temperature/TemperatureExtension.cs @@ -15,7 +15,7 @@ public static class TemperatureExtension /// /// /// - public static async Task SymbolKelvinAsync() + public static async Task SymbolKelvinAsync() { return await Task.FromResult(SymbolKelvin); } diff --git a/src/Skylark.Standard/Helper/Password/PasswordHelper.cs b/src/Skylark.Standard/Helper/Password/PasswordHelper.cs index 3aa89d2a..b0fcf695 100644 --- a/src/Skylark.Standard/Helper/Password/PasswordHelper.cs +++ b/src/Skylark.Standard/Helper/Password/PasswordHelper.cs @@ -163,14 +163,14 @@ public static double GetSimilarity(string Password1, string Password2, ESRPT Sim if (P1 == 0) { - Similarity = 1 - (double)P2 / Math.Max(Password1.Length, Password2.Length); + Similarity = 1 - ((double)P2 / Math.Max(Password1.Length, Password2.Length)); return Similarity; } if (P2 == 0) { - Similarity = 1 - (double)P1 / Math.Max(Password1.Length, Password2.Length); + Similarity = 1 - ((double)P1 / Math.Max(Password1.Length, Password2.Length)); return Similarity; } @@ -187,7 +187,7 @@ public static double GetSimilarity(string Password1, string Password2, ESRPT Sim int Distance = D[P1, P2]; - Similarity = 1 - (double)Distance / Math.Max(Password1.Length, Password2.Length); + Similarity = 1 - ((double)Distance / Math.Max(Password1.Length, Password2.Length)); return Similarity; } diff --git a/src/Skylark/Helper/Skymath.cs b/src/Skylark/Helper/Skymath.cs index 34a826bf..e2fb6b98 100644 --- a/src/Skylark/Helper/Skymath.cs +++ b/src/Skylark/Helper/Skymath.cs @@ -67,9 +67,9 @@ public static TOut Average(IEnumerable Elements, TSum Zero /// Point A with a weight towards B public static double Lerp(double A, double B, double Weight) { - return A * (1d - Weight) + B * Weight; + return (A * (1d - Weight)) + (B * Weight); } - + /// /// /// @@ -79,7 +79,7 @@ public static double Lerp(double A, double B, double Weight) /// Point A with a weight towards B public static double Lerp(float A, float B, float Weight) { - return A * (1f - Weight) + B * Weight; + return (A * (1f - Weight)) + (B * Weight); } } } \ No newline at end of file