Files
orx/orx-noise/src/commonMain/kotlin/CubicNoise1D.kt
2021-06-24 13:31:27 +02:00

10 lines
368 B
Kotlin

package org.openrndr.extra.noise
fun cubicLinear(seed: Int, x: Double) = cubic(seed, x, ::linear)
fun cubicQuintic(seed: Int, x: Double) = cubic(seed, x, ::quintic)
fun cubicHermite(seed: Int, x: Double) = cubic(seed, x, ::hermite)
fun cubic(seed: Int, x: Double, interpolator: (Double) -> Double = ::linear): Double {
return cubic(seed, x, 0.0, interpolator)
}