From 31407552018f2a63689fc9da3128f61339a2f1ba Mon Sep 17 00:00:00 2001 From: Mask Date: Thu, 27 Aug 2020 18:53:00 +0300 Subject: [PATCH 1/7] Good job --- csharp/Platform.Numbers/Bit.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/csharp/Platform.Numbers/Bit.cs b/csharp/Platform.Numbers/Bit.cs index 9954b24..35297e1 100644 --- a/csharp/Platform.Numbers/Bit.cs +++ b/csharp/Platform.Numbers/Bit.cs @@ -2,15 +2,12 @@ #pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - - namespace Platform.Numbers { /// /// A set of operations on the set bits of a number. /// Набор операций над установленными битами числа. /// - public static class Bit { /// From 32a4f2ea4aa5de53c54e18226dc5a4930d42dce1 Mon Sep 17 00:00:00 2001 From: Mask Date: Mon, 31 Aug 2020 00:21:33 +0300 Subject: [PATCH 2/7] Don't touch please --- csharp/Auxiliary template.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 csharp/Auxiliary template.txt diff --git a/csharp/Auxiliary template.txt b/csharp/Auxiliary template.txt new file mode 100644 index 0000000..3e5aeb3 --- /dev/null +++ b/csharp/Auxiliary template.txt @@ -0,0 +1,16 @@ +/// +/// . +/// . +/// +/// +/// . +/// . +/// +/// +/// . +/// . +/// +/// +/// . +/// . +/// From a36ce16b9679e9c5f2babe1a24cb83a838741d19 Mon Sep 17 00:00:00 2001 From: Mask Date: Fri, 28 Aug 2020 00:24:48 +0300 Subject: [PATCH 3/7] Added templates --- csharp/Platform.Numbers/Math.cs | 66 ++++++++++++++++++++++++++++++--- 1 file changed, 61 insertions(+), 5 deletions(-) diff --git a/csharp/Platform.Numbers/Math.cs b/csharp/Platform.Numbers/Math.cs index ff7bccd..14f8459 100644 --- a/csharp/Platform.Numbers/Math.cs +++ b/csharp/Platform.Numbers/Math.cs @@ -21,7 +21,7 @@ public static class Math 479001600, 6227020800, 87178291200, 1307674368000, 20922789888000, 355687428096000, 6402373705728000, 121645100408832000, 2432902008176640000 }; - + /// /// Source: https://oeis.org/A000108/list /// Источник: https://oeis.org/A000108/list @@ -43,8 +43,14 @@ public static class Math /// Returns the product of all positive integers less than or equal to the number specified as an argument. /// Возвращает произведение всех положительных чисел меньше или равных указанному в качестве аргумента числу. /// - /// The maximum positive number that will participate in factorial's product.Максимальное положительное число, которое будет участвовать в произведение факториала. - /// The product of all positive integers less than or equal to the number specified as an argument.Произведение всех положительных чисел меньше или равных указанному в качестве аргумента числу. + /// + /// The maximum positive number that will participate in factorial's product. + /// Максимальное положительное число, которое будет участвовать в произведение факториала. + /// + /// + /// The product of all positive integers less than or equal to the number specified as an argument. + /// Произведение всех положительных чисел меньше или равных указанному в качестве аргумента числу. + /// public static ulong Factorial(ulong n) { if (n >= 0 && n <= MaximumFactorialNumber) @@ -61,8 +67,14 @@ public static ulong Factorial(ulong n) /// Returns the Catalan Number with the number specified as an argument. /// Возвращает Каталановое число с номером указанным в качестве аргумента. /// - /// The number of Catalan number.Номер Каталанового числа. - /// The Catalan Number with the number specified as an argument.Каталановое число с номером указанным в качестве аргумента. + /// + /// The number of Catalan number. + /// Номер Каталанового числа. + /// + /// + /// The Catalan Number with the number specified as an argument. + /// Каталановое число с номером указанным в качестве аргумента. + /// public static ulong Catalan(ulong n) { if (n >= 0 && n <= MaximumCatalanIndex) @@ -75,12 +87,56 @@ public static ulong Catalan(ulong n) } } + /// + /// . + /// . + /// + /// + /// . + /// . + /// + /// + /// . + /// . + /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool IsPowerOfTwo(ulong x) => (x & x - 1) == 0; + /// + /// . + /// . + /// + /// + /// The number type. + /// Тип числа. + /// + /// + /// . + /// . + /// + /// + /// . + /// . + /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static T Abs(T x) => Math.Abs(x); + /// + /// . + /// . + /// + /// + /// The number type. + /// Тип числа. + /// + /// + /// . + /// . + /// + /// + /// . + /// . + /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static T Negate(T x) => Math.Negate(x); } From b1b0be1f214205e3d14ef05be425eb07e555859f Mon Sep 17 00:00:00 2001 From: Mask Date: Mon, 31 Aug 2020 01:22:26 +0300 Subject: [PATCH 4/7] Added method description --- csharp/Platform.Numbers/Math.cs | 36 ++++++++++++++++----------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/csharp/Platform.Numbers/Math.cs b/csharp/Platform.Numbers/Math.cs index 14f8459..12b2e77 100644 --- a/csharp/Platform.Numbers/Math.cs +++ b/csharp/Platform.Numbers/Math.cs @@ -88,54 +88,54 @@ public static ulong Catalan(ulong n) } /// - /// . - /// . + /// Checks if a number is a power of two. + /// Проверяет является ли число степенью двойки. /// /// - /// . - /// . + /// Number to check. + /// Число для проверки. /// /// - /// . - /// . + /// True or False. + /// True или False. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool IsPowerOfTwo(ulong x) => (x & x - 1) == 0; /// - /// . - /// . + /// Takes a module from a number. + /// Берёт модуль от числа. /// /// /// The number type. /// Тип числа. /// /// - /// . - /// . + /// The number from which to take the absolute value. + /// Число от которого необходимо взять абсолютное значение. /// /// - /// . - /// . + /// The absolute value of a number. + /// Абсолютное значение числа. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static T Abs(T x) => Math.Abs(x); /// - /// . - /// . + /// Makes a number negative. + /// Делает число отрицательным. /// /// /// The number type. /// Тип числа. /// /// - /// . - /// . + /// The number to be made negative. + /// Число которое нужно сделать отрицательным. /// /// - /// . - /// . + /// Negative number. + /// Отрицательное число. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static T Negate(T x) => Math.Negate(x); From 744b51b7d2b672e729829f6a812f53bd0aaaefed Mon Sep 17 00:00:00 2001 From: Mask Date: Thu, 1 Oct 2020 17:22:00 +0300 Subject: [PATCH 5/7] Fixed lexical errors --- csharp/Platform.Numbers/Math.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/csharp/Platform.Numbers/Math.cs b/csharp/Platform.Numbers/Math.cs index 12b2e77..ac7be00 100644 --- a/csharp/Platform.Numbers/Math.cs +++ b/csharp/Platform.Numbers/Math.cs @@ -96,8 +96,8 @@ public static ulong Catalan(ulong n) /// Число для проверки. /// /// - /// True or False. - /// True или False. + /// True if the number is a power of two otherwise false. + /// True, если число является степенью двойки, иначе - false /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool IsPowerOfTwo(ulong x) => (x & x - 1) == 0; @@ -115,7 +115,7 @@ public static ulong Catalan(ulong n) /// Число от которого необходимо взять абсолютное значение. /// /// - /// The absolute value of a number. + /// The absolute value of the number. /// Абсолютное значение числа. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -134,7 +134,7 @@ public static ulong Catalan(ulong n) /// Число которое нужно сделать отрицательным. /// /// - /// Negative number. + /// A negative number. /// Отрицательное число. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] From 11550965d042c5b55149465c59d44fb19d04c347 Mon Sep 17 00:00:00 2001 From: Mask Date: Tue, 6 Oct 2020 12:16:40 +0300 Subject: [PATCH 6/7] Axillary templates.txt --- csharp/Auxiliary template.txt | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 csharp/Auxiliary template.txt diff --git a/csharp/Auxiliary template.txt b/csharp/Auxiliary template.txt deleted file mode 100644 index 3e5aeb3..0000000 --- a/csharp/Auxiliary template.txt +++ /dev/null @@ -1,16 +0,0 @@ -/// -/// . -/// . -/// -/// -/// . -/// . -/// -/// -/// . -/// . -/// -/// -/// . -/// . -/// From 051d14341566ec6e8622ca7a684d2d6dda326907 Mon Sep 17 00:00:00 2001 From: Mask Date: Tue, 6 Oct 2020 12:56:48 +0300 Subject: [PATCH 7/7] Fixed lexical errrs --- csharp/Platform.Numbers/Math.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/csharp/Platform.Numbers/Math.cs b/csharp/Platform.Numbers/Math.cs index ac7be00..f8b116d 100644 --- a/csharp/Platform.Numbers/Math.cs +++ b/csharp/Platform.Numbers/Math.cs @@ -68,7 +68,7 @@ public static ulong Factorial(ulong n) /// Возвращает Каталановое число с номером указанным в качестве аргумента. /// /// - /// The number of Catalan number. + /// The number of the Catalan number. /// Номер Каталанового числа. /// /// @@ -92,12 +92,12 @@ public static ulong Catalan(ulong n) /// Проверяет является ли число степенью двойки. /// /// - /// Number to check. + /// The number to check. /// Число для проверки. /// /// /// True if the number is a power of two otherwise false. - /// True, если число является степенью двойки, иначе - false + /// True, если число является степенью двойки, иначе - false. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool IsPowerOfTwo(ulong x) => (x & x - 1) == 0;