Upgrade to JDK 17. Add @JvmRecord annotations

This commit is contained in:
Edwin Jakobs
2024-06-01 07:31:44 +02:00
parent 06f593053b
commit 78fbff54c5
38 changed files with 94 additions and 33 deletions

View File

@@ -2,6 +2,7 @@ package org.openrndr.extra.hashgrid
import org.openrndr.math.Vector2
import org.openrndr.shape.Rectangle
import kotlin.jvm.JvmRecord
import kotlin.math.abs
import kotlin.math.max
import kotlin.math.min
@@ -12,6 +13,7 @@ private fun Double.fastFloor(): Int {
return if (this >= 0) this.toInt() else this.toInt() - 1
}
@JvmRecord
private data class GridCoords(val x: Int, val y: Int) {
fun offset(i: Int, j: Int): GridCoords = copy(x = x + i, y = y + j)
}