Convert orx-shader-phrases and orx-noise to MPP
This commit is contained in:
10
orx-noise/src/commonMain/kotlin/CubicNoise1D.kt
Normal file
10
orx-noise/src/commonMain/kotlin/CubicNoise1D.kt
Normal file
@@ -0,0 +1,10 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user