]> git.donarmstrong.com Git - mothur.git/blobdiff - mothurout.cpp
minor mods to seq.error
[mothur.git] / mothurout.cpp
index a56a6217a8c136e1fcb9f3f3078c5418547220fa..9896157d0fa8a968446e4e5f345398b59c6ef711 100644 (file)
@@ -562,6 +562,21 @@ string MothurOut::getSimpleName(string longName){
 
 /***********************************************************************/
 
+int MothurOut::getRandomIndex(int highest){
+       try {
+               
+               int random = (int) ((float)(highest+1) * (float)(rand()) / ((float)RAND_MAX+1.0));
+               
+               return random;
+       }
+       catch(exception& e) {
+               errorOut(e, "MothurOut", "getRandomIndex");
+               exit(1);
+       }       
+       
+}
+/**********************************************************************/
+
 string MothurOut::getPathName(string longName){
        try {
                string rootPathName = longName;