← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5959: Minor fix

 

------------------------------------------------------------
revno: 5959
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-02-14 19:08:11 +0100
message:
  Minor fix
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/simpleRegression.js


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/simpleRegression.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/simpleRegression.js	2012-02-14 18:00:17 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/simpleRegression.js	2012-02-14 18:08:11 +0000
@@ -2,9 +2,6 @@
 /**
  * Partial js port of commons math SimpleRegression class.
  */
-
-var simpleRegression = new SimpleRegression();
-
 function SimpleRegression()
 {
 	var sumX = 0; // Sum of x values
@@ -39,9 +36,9 @@
 	
 	this.predict = function( x )
 	{
-		var b1 = simpleRegression.getSlope();
+		var b1 = this.getSlope();
 		
-		return simpleRegression.getIntercept( b1 ) + b1  * x;
+		return this.getIntercept( b1 ) + b1 * x;
 	};
 	
 	this.getSlope = function()