[Kst] kdeextragear-2/kst/kst

Barth Netterfield netterfield at astro.utoronto.ca
Thu Mar 10 04:42:47 CET 2005


CVS commit by netterfield: 

CONST_PI now uses M_PI in math.h
Add a couple more constants useful for deg to radian conversions.


  M +5 -1      kstdoc.cpp   1.152
  M +2 -2      kstequation.h   1.7


--- kdeextragear-2/kst/kst/kstdoc.cpp  #1.151:1.152
@@ -25,4 +25,5 @@
 #include <fcntl.h>
 #include <unistd.h>
+#include <math.h>
 
 // include files for Qt
@@ -918,5 +919,8 @@ void KstDoc::createScalars() const {
   new KstScalar("CONST_MKSA_MOLAR_GAS", 8.314472e0, false);
   new KstScalar("CONST_MKSA_STANDARD_GAS_VOLUME", 2.2710981e-2, false);
-  new KstScalar("CONST_PI", 3.141592654e0, false);
+  new KstScalar("CONST_PI", M_PI, false);
+  new KstScalar("C_PI", M_PI, false);
+  new KstScalar("C_R2D", 180.0/M_PI, false); // radians to degrees
+  new KstScalar("C_D2R", M_PI/180.0, false); // degrees to radians  
 }
 

--- kdeextragear-2/kst/kst/kstequation.h  #1.6:1.7
@@ -50,6 +50,6 @@ class KstEquation : public KstDataObject
 
     virtual QString equation() const { return _equation; }
-    KstVectorPtr vX() { return _inputVectors[XVECTOR]; }
-    KstVectorPtr vY() { return _outputVectors[OUTVECTOR]; }
+    KstVectorPtr vX() { return *_xVector; }
+    KstVectorPtr vY() { return *_yVector; }
 
     virtual bool slaveVectorsUsed() const;




More information about the Kst mailing list