Use file-scoped namespaces

This commit is contained in:
Oliver Booth 2022-04-20 18:51:20 +01:00
parent 37c7b74379
commit d4e3c8ab50
No known key found for this signature in database
GPG Key ID: 32A00B35503AF634
3 changed files with 137 additions and 140 deletions

View File

@ -1,12 +1,12 @@
using System.ComponentModel;
namespace X10D
namespace X10D;
/// <summary>
/// Represents an enumeration of endianness values.
/// </summary>
public enum Endianness
{
/// <summary>
/// Represents an enumeration of endianness values.
/// </summary>
public enum Endianness
{
/// <summary>
/// The value should be read as though it uses little endian encoding.
/// </summary>
@ -18,5 +18,4 @@ namespace X10D
/// </summary>
[Description("The value should be read as though it uses big endian encoding.")]
BigEndian
}
}

View File

@ -1,10 +1,10 @@
namespace X10D
namespace X10D;
/// <summary>
/// Provides static helpers methods for mathematical functions not found in the .NET <see cref="System.Math" /> class.
/// </summary>
public static class MathUtils
{
/// <summary>
/// Provides static helpers methods for mathematical functions not found in the .NET <see cref="System.Math" /> class.
/// </summary>
public static class MathUtils
{
/// <summary>
/// Linearly interpolates from one value to a target using a specified alpha.
/// </summary>
@ -36,5 +36,4 @@
// "precise" method: (1 - t) * a + t * b
return ((1.0 - alpha) * value) + (alpha * target);
}
}
}

View File

@ -1,13 +1,13 @@
using System.Globalization;
using System.Text.RegularExpressions;
namespace X10D
namespace X10D;
/// <summary>
/// Represents a class which contains a <see cref="string" /> parser which converts into <see cref="TimeSpan" />.
/// </summary>
public static class TimeSpanParser
{
/// <summary>
/// Represents a class which contains a <see cref="string" /> parser which converts into <see cref="TimeSpan" />.
/// </summary>
public static class TimeSpanParser
{
private const string RealNumberPattern = @"(\d*\.\d+|\d+)";
private static readonly string Pattern = $"^(?:{RealNumberPattern} *y)? *" +
@ -99,5 +99,4 @@ namespace X10D
return true;
}
}
}