From: Anne-Marie Mahfouf Date: Sun, 17 Oct 2004 01:18:45 +0000 (+0000) Subject: fix bug 91287 X-Git-Tag: v3.80.2~300^2~164 X-Git-Url: https://git.rmz.fi/?a=commitdiff_plain;h=8a6ad21df2f2f9c585e354fdd82da8546ae63106;p=libqmvoc.git fix bug 91287 BUG:91287 CCMAIL=cniehaus@kde.org svn path=/trunk/kdeedu/kalzium/src/element.cpp; revision=355154 --- diff --git a/kalzium/src/element.cpp b/kalzium/src/element.cpp index aee8f52..b1ad904 100644 --- a/kalzium/src/element.cpp +++ b/kalzium/src/element.cpp @@ -109,15 +109,15 @@ const QString Element::adjustUnits( double val, const int type ) v = QString::number( val ); v.append( "K" ); break; - case 1:// Kelvin to Fahrenheit - val = val * 1.8 - 459.67; + case 1://Kelvin to Celsius + val-=273.15; v = QString::number( val ); - v.append( "F" ); + v.append( "C" ); break; - case 2: //Kelvin to Celsius - val-=273.15; + case 2: // Kelvin to Fahrenheit + val = val * 1.8 - 459.67; v = QString::number( val ); - v.append( "°C" ); + v.append( "F" ); break; } }