Fix demos, upgrade to Gradle 7.2

This commit is contained in:
Edwin Jakobs
2021-08-22 15:44:40 +02:00
parent 48987fc551
commit 701f14400a
11 changed files with 45 additions and 25 deletions

View File

@@ -29,15 +29,9 @@ fun ((Int, Double, Double, Double) -> Double).crossFade(
return { seed, x, y, z ->
val a = z.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 + (1.0 - f) * this(
seed,
x,
y,
(a + 1.0).map(0.0, 1.0, start, end)
)
o
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))
o + s
}
}
@@ -131,4 +125,7 @@ inline fun ((Int, Double, Double, Double) -> Double).perturb(crossinline distort
inline fun ((Int, Vector4) -> Double).perturb(crossinline distort: (Vector4) -> Vector4): (Int, Vector4) -> Double =
{ seed, v ->
this(seed, distort(v))
}
}
typealias IDDD_D = ((Int, Double, Double, Double) -> Double)