From d0f0e3d2c876c9ac5120f3433739f8fc8505ae66 Mon Sep 17 00:00:00 2001 From: Markus Ewald Date: Thu, 8 Jul 2010 12:32:41 +0000 Subject: [PATCH] Added missing comment; minor cosmetic fixes git-svn-id: file:///srv/devel/repo-conversion/nusu@200 d2e56fa2-650e-0410-a79f-9358c0239efd --- Source/StringBuilderHelper.cs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Source/StringBuilderHelper.cs b/Source/StringBuilderHelper.cs index df484d7..4be648d 100644 --- a/Source/StringBuilderHelper.cs +++ b/Source/StringBuilderHelper.cs @@ -124,7 +124,8 @@ namespace Nuclex.Support { const int ExponentBias = 127; // Bias subtraced from exponent const int NumericBitCount = 31; // Bits without sign - // You don't need modify these as they're calculated based on the + // You don't need modify these as they're calculated based on + // the constants assigned above. const int FractionalBits = (2 << FractionalBitCount) - 1; const int HighestFractionalBit = (1 << FractionalBitCount); const int FractionalBitCountPlusOne = FractionalBitCount + 1; @@ -223,14 +224,15 @@ namespace Nuclex.Support { const int ExponentBias = 1023; // Bias subtraced from exponent const int NumericBitCount = 63; // Bits without sign - // You don't need modify these as they're calculated based on the + // You don't need modify these as they're calculated based on + // the constants assigned above. const long FractionalBits = (2L << FractionalBitCount) - 1; const long HighestFractionalBit = (1L << FractionalBitCount); const int FractionalBitCountPlusOne = FractionalBitCount + 1; - long intValue = FloatHelper.ReinterpretAsLong(value); - long exponent = ((intValue >> FractionalBitCount) & ExponentBits) - ExponentBias; - long mantissa = (intValue & FractionalBits) | HighestFractionalBit; + long longValue = FloatHelper.ReinterpretAsLong(value); + long exponent = ((longValue >> FractionalBitCount) & ExponentBits) - ExponentBias; + long mantissa = (longValue & FractionalBits) | HighestFractionalBit; long integral; long fractional; @@ -254,7 +256,7 @@ namespace Nuclex.Support { } // Build the integral part - if(intValue < 0) { + if(longValue < 0) { builder.Append('-'); } if(integral == 0) {