]> git.mxchange.org Git - simgear.git/blobdiff - simgear/math/sg_random.c
Modified Files:
[simgear.git] / simgear / math / sg_random.c
index fa3f213dac91a8cab62a7cc38bd09d4d5a39929b..b58cf9387f861650390d3087060295ecda862a28 100644 (file)
@@ -2,7 +2,7 @@
 //
 // Written by Curtis Olson, started July 1997.
 //
-// Copyright (C) 1997  Curtis L. Olson  - curt@infoplane.com
+// Copyright (C) 1997  Curtis L. Olson  - http://www.flightgear.org/~curt
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Library General Public
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 // Library General Public License for more details.
 //
-// You should have received a copy of the GNU Library General Public
-// License along with this library; if not, write to the
-// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-// Boston, MA  02111-1307, USA.
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //
 // $Id$
 
@@ -134,6 +133,13 @@ void sg_srandom_time() {
     init_genrand(time(NULL));
 }
 
+// Seed the random number generater with time() in 10 minute intervals
+// so we get the same sequence within 10 minutes interval.
+// This is useful for synchronizing two display systems.
+void sg_srandom_time_10() {
+    init_genrand(time(NULL) / 600);
+}
+
 
 // Seed the random number generater with your own seed so can set up
 // repeatable randomization.