diff --git a/Source/Collections/Variegator.cs b/Source/Collections/Variegator.cs index 711138e..6d86b51 100644 --- a/Source/Collections/Variegator.cs +++ b/Source/Collections/Variegator.cs @@ -36,8 +36,8 @@ namespace Nuclex.Support.Collections { /// /// /// In principle, it works like a multimap, associating keys with a number of values - /// and allowing you to look up a values by their keys. Unlike a multimap, it will - /// avoid handing out a previously provided value again. + /// and allowing you to look up values by their keys. Unlike a multimap, it will try + /// to avoid handing out a previously provided value again as long as possible. /// /// /// A typical usage would be to set up a mapping between situations and dialogue lines. @@ -282,6 +282,6 @@ namespace Nuclex.Support.Collections { } -} // namespace Nuclex { namespace Support { namespace Collections +} // namespace Nuclex.Support.Collections #endif // !(WINDOWS_PHONE || XBOX360) diff --git a/Source/FloatHelper.cs b/Source/FloatHelper.cs index 1a09609..fca4749 100644 --- a/Source/FloatHelper.cs +++ b/Source/FloatHelper.cs @@ -44,11 +44,11 @@ namespace Nuclex.Support { /// public static class FloatHelper { - #region struct FloatInt32Union + #region struct FloatIntUnion /// Union of a floating point variable and an integer [StructLayout(LayoutKind.Explicit)] - private struct FloatInt32Union { + private struct FloatIntUnion { /// The union's value as a floating point variable [FieldOffset(0)] @@ -64,13 +64,13 @@ namespace Nuclex.Support { } - #endregion // struct FloatInt32Union + #endregion // struct FloatIntUnion - #region struct DoubleInt64Union + #region struct DoubleLongUnion /// Union of a double precision floating point variable and a long [StructLayout(LayoutKind.Explicit)] - private struct DoubleInt64Union { + private struct DoubleLongUnion { /// The union's value as a double precision floating point variable [FieldOffset(0)] @@ -86,7 +86,7 @@ namespace Nuclex.Support { } - #endregion // struct DoubleInt64Union + #endregion // struct DoubleLongUnion /// A floating point value that holds a positive zero public const float PositiveZeroFloat = +0.0f; @@ -150,8 +150,8 @@ namespace Nuclex.Support { /// /// public static bool AreAlmostEqual(float left, float right, int maxUlps) { - var leftUnion = new FloatInt32Union(); - var rightUnion = new FloatInt32Union(); + var leftUnion = new FloatIntUnion(); + var rightUnion = new FloatIntUnion(); leftUnion.Float = left; rightUnion.Float = right; @@ -214,8 +214,8 @@ namespace Nuclex.Support { /// /// public static bool AreAlmostEqual(double left, double right, long maxUlps) { - var leftUnion = new DoubleInt64Union(); - var rightUnion = new DoubleInt64Union(); + var leftUnion = new DoubleLongUnion(); + var rightUnion = new DoubleLongUnion(); leftUnion.Double = left; rightUnion.Double = right; @@ -260,7 +260,7 @@ namespace Nuclex.Support { /// The memory contents of the floating point value interpreted as an integer /// public static int ReinterpretAsInt(this float value) { - FloatInt32Union union = new FloatInt32Union(); + FloatIntUnion union = new FloatIntUnion(); union.Float = value; return union.Int; } @@ -277,7 +277,7 @@ namespace Nuclex.Support { /// interpreted as an integer /// public static long ReinterpretAsLong(this double value) { - DoubleInt64Union union = new DoubleInt64Union(); + DoubleLongUnion union = new DoubleLongUnion(); union.Double = value; return union.Long; } @@ -290,7 +290,7 @@ namespace Nuclex.Support { /// The memory contents of the integer value interpreted as a floating point value /// public static float ReinterpretAsFloat(this int value) { - FloatInt32Union union = new FloatInt32Union(); + FloatIntUnion union = new FloatIntUnion(); union.Int = value; return union.Float; } @@ -305,7 +305,7 @@ namespace Nuclex.Support { /// floating point value /// public static double ReinterpretAsDouble(this long value) { - DoubleInt64Union union = new DoubleInt64Union(); + DoubleLongUnion union = new DoubleLongUnion(); union.Long = value; return union.Double; }