From 806472cc9922f6b7ed7c1cab575f7965f5c910fb Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Sat, 8 Mar 2025 17:14:54 +0700 Subject: [PATCH] Clarify docs --- src/main/kotlin/ru/dbotthepony/kommons/random/LCG64Random.kt | 3 +++ src/main/kotlin/ru/dbotthepony/kommons/random/PCG32Random.kt | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/ru/dbotthepony/kommons/random/LCG64Random.kt b/src/main/kotlin/ru/dbotthepony/kommons/random/LCG64Random.kt index 0855efc..e4d47bd 100644 --- a/src/main/kotlin/ru/dbotthepony/kommons/random/LCG64Random.kt +++ b/src/main/kotlin/ru/dbotthepony/kommons/random/LCG64Random.kt @@ -7,6 +7,9 @@ import java.util.random.RandomGenerator * * Internal state is presented as 64-bit integer, and high-order bits of internal state are * used to generate numbers. + * + * Generally shouldn't be used, and instead [PCG32Random] should be used, considering the latter has same memory + * requirements but has way better statistical properties. */ open class LCG64Random(protected var seed: Long) : RandomGenerator { override fun nextLong(): Long { diff --git a/src/main/kotlin/ru/dbotthepony/kommons/random/PCG32Random.kt b/src/main/kotlin/ru/dbotthepony/kommons/random/PCG32Random.kt index 7231120..2e4575c 100644 --- a/src/main/kotlin/ru/dbotthepony/kommons/random/PCG32Random.kt +++ b/src/main/kotlin/ru/dbotthepony/kommons/random/PCG32Random.kt @@ -3,7 +3,7 @@ package ru.dbotthepony.kommons.random import java.util.random.RandomGenerator /** - * PCG XSH RR 32-bit (64-bit state) random generator, which has better statistical properties + * PCG XSH RR 32-bit (64-bit state) random generator, which has way better statistical properties * than plain [LCG64Random] generator */ open class PCG32Random(protected var seed: Long) : RandomGenerator {