summaryrefslogtreecommitdiff
path: root/sources/utils/VSRandom.java
diff options
context:
space:
mode:
Diffstat (limited to 'sources/utils/VSRandom.java')
-rw-r--r--sources/utils/VSRandom.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/sources/utils/VSRandom.java b/sources/utils/VSRandom.java
index 4f23e7e..088da4f 100644
--- a/sources/utils/VSRandom.java
+++ b/sources/utils/VSRandom.java
@@ -1,16 +1,40 @@
+/*
+ * VS is (c) 2008 by Paul C. Buetow
+ * vs@dev.buetow.org
+ */
package utils;
import java.util.Random;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class VSRandom.
+ */
public final class VSRandom extends Random {
+
+ /**
+ * Instantiates a new vS random.
+ *
+ * @param seedAdd the seed add
+ */
public VSRandom(long seedAdd) {
super(seedAdd*System.currentTimeMillis()+seedAdd);
}
+ /* (non-Javadoc)
+ * @see java.util.Random#nextInt()
+ */
public int nextInt() {
return Math.abs(super.nextInt());
}
+ /**
+ * Next long.
+ *
+ * @param mod the mod
+ *
+ * @return the long
+ */
public long nextLong(long mod) {
return Math.abs((super.nextLong() + System.currentTimeMillis()) % mod);
}