Replace mod_() calls with mod()

This commit is contained in:
Edwin Jakobs
2023-04-29 13:51:06 +02:00
parent 175200abdb
commit ccd7a98b12
14 changed files with 17 additions and 17 deletions

View File

@@ -267,7 +267,7 @@ fun ((Int, Double) -> Double).crossFade(
width: Double = 0.5
): (Int, Double) -> Double {
return { seed, t ->
val a = t.map(start, end, 0.0, 1.0).mod_(1.0)
val a = t.map(start, end, 0.0, 1.0).mod(1.0)
val f = (a / width).coerceAtMost(1.0)
val o = this(seed, a.map(0.0, 1.0, start, end)) * f
val s = this(seed, (a + 1.0).map(0.0, 1.0, start, end)) * (1.0 - f)
@@ -281,7 +281,7 @@ fun ((Int, Double, Double) -> Double).crossFade(
width: Double = 0.5
): (Int, Double, Double) -> Double {
return { seed, x, t ->
val a = t.map(start, end, 0.0, 1.0).mod_(1.0)
val a = t.map(start, end, 0.0, 1.0).mod(1.0)
val f = (a / width).coerceAtMost(1.0)
val o = this(seed, x, a.map(0.0, 1.0, start, end)) * f
val s = this(seed, x, (a + 1.0).map(0.0, 1.0, start, end)) * (1.0 - f)
@@ -295,7 +295,7 @@ fun ((Int, Double, Double, Double) -> Double).crossFade(
width: Double = 0.5
): (Int, Double, Double, Double) -> Double {
return { seed, x, y, t ->
val a = t.map(start, end, 0.0, 1.0).mod_(1.0)
val a = t.map(start, end, 0.0, 1.0).mod(1.0)
val f = (a / width).coerceAtMost(1.0)
val o = this(seed, x, y, a.map(0.0, 1.0, start, end)) * f
val s = this(seed, x, y, (a + 1.0).map(0.0, 1.0, start, end)) * (1.0 - f)

View File

@@ -19,7 +19,7 @@ fun main() {
drawer.fill = ColorRGBa.PINK
drawer.circles(points, 4.0)
if (seconds.mod_(2.0) < 1.0) {
if (seconds.mod(2.0) < 1.0) {
drawer.stroke = ColorRGBa.PINK
drawer.fill = null
drawer.shape(shape)