[orx-noise] Add tools for functional composition

This commit is contained in:
Edwin Jakobs
2021-07-25 22:36:07 +02:00
parent c388cbe7e2
commit 454affbdfd
15 changed files with 532 additions and 74 deletions

View File

@@ -0,0 +1,14 @@
package org.openrndr.extra.noise
import org.openrndr.math.Vector2
fun ((Int, Double) -> Double).vector2(): (seed: Int, x: Double) -> Vector2 {
val ref = this
return { seed:Int, x:Double ->
Vector2(ref(-seed, x), ref(seed, -x))
}
}
private fun exampleVector() {
::simplex2D
}