[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lon-capa-cvs
Subject:    [LON-CAPA-cvs] cvs: modules /gerd evaluate.pl
From:       www <lon-capa-cvs () mail ! lon-capa ! org>
Date:       2006-03-31 21:43:44
Message-ID: cvswww1143841424 () cvsserver
[Download RAW message or body]

www		Fri Mar 31 16:43:44 2006 EDT

  Modified files:              
    /modules/gerd	evaluate.pl 
  Log:
  Rounding
  
  
Index: modules/gerd/evaluate.pl
diff -u modules/gerd/evaluate.pl:1.6 modules/gerd/evaluate.pl:1.7
--- modules/gerd/evaluate.pl:1.6	Fri Mar 31 11:43:09 2006
+++ modules/gerd/evaluate.pl	Fri Mar 31 16:43:43 2006
@@ -280,7 +280,11 @@
    unless ($threshold) { $threshold=0.29; }
    my ($c,$n)=&correlation(&buildarrays($array1,$arrayidx1,$array2,$arrayidx2,$userkeys));
    unless (abs($c)>$threshold) { return ('',''); }
-   $c=int($c*100+0.5)/100;
+   if ($c>0) {
+      $c=int($c*100+0.5)/100;
+   } else {
+      $c=int($c*100-0.5)/100;
+   }
    return " $label: $c ($n)";
 }
 


_______________________________________________
LON-CAPA-cvs mailing list
LON-CAPA-cvs@mail.lon-capa.org
http://mail.lon-capa.org/mailman/listinfo/lon-capa-cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic