[Rcpp-commits] r3984 - pkg/Rcpp/inst/include/Rcpp/sugar/functions
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Nov 16 16:10:39 CET 2012
Author: romain
Date: 2012-11-16 16:10:39 +0100 (Fri, 16 Nov 2012)
New Revision: 3984
Modified:
pkg/Rcpp/inst/include/Rcpp/sugar/functions/minmax.h
Log:
silly bug
Modified: pkg/Rcpp/inst/include/Rcpp/sugar/functions/minmax.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/sugar/functions/minmax.h 2012-11-16 12:32:21 UTC (rev 3983)
+++ pkg/Rcpp/inst/include/Rcpp/sugar/functions/minmax.h 2012-11-16 15:10:39 UTC (rev 3984)
@@ -42,7 +42,7 @@
if( Rcpp::traits::is_na<RTYPE>( current ) ) return current;
if( current < min_ ) min_ = current ;
}
- return min ;
+ return min_ ;
}
STORAGE max() {
max_ = obj[0] ;
@@ -54,7 +54,7 @@
if( Rcpp::traits::is_na<RTYPE>( current ) ) return current;
if( current > max_ ) max_ = current ;
}
- return min ;
+ return max_ ;
}
Vector<RTYPE> range(){
min_ = max_ = obj[0] ;
@@ -93,7 +93,7 @@
current = obj[i] ;
if( current < min_ ) min_ = current ;
}
- return min ;
+ return min_ ;
}
STORAGE max() {
max_ = obj[0] ;
@@ -103,7 +103,7 @@
current = obj[i] ;
if( current > max_ ) max_ = current ;
}
- return min ;
+ return max_ ;
}
Vector<RTYPE> range(){
min_ = max_ = obj[0] ;
More information about the Rcpp-commits
mailing list