Kotlin replacement for math util

This commit is contained in:
Robinson 2022-04-04 14:33:12 +02:00
parent 4967faf212
commit a3bacf7b89
No known key found for this signature in database
GPG Key ID: 8E7DB78588BD6F5C

View File

@ -72,7 +72,7 @@ class AeronOutput : Output {
constructor(bufferSize: Int = 32) {
require(bufferSize >= 0) { "bufferSize must be >= 0!" }
// Minimum buffer size allowed is size = 2 (because it grows by 1.5x the current size)
internalBuffer = ExpandableDirectByteBuffer(Math.max(2, bufferSize))
internalBuffer = ExpandableDirectByteBuffer(2.coerceAtLeast(bufferSize))
}
/**