2024-09-04 01:38:27 +10:00
|
|
|
public protocol CoherentNoise {
|
2024-08-29 03:56:54 +10:00
|
|
|
associatedtype Scalar: FloatingPoint & SIMDScalar
|
|
|
|
}
|
|
|
|
|
2024-09-04 01:38:27 +10:00
|
|
|
public protocol CoherentNoiseRandomInit: CoherentNoise {
|
|
|
|
init<Random: RandomProvider>(random: inout Random)
|
|
|
|
}
|
2024-08-29 03:56:54 +10:00
|
|
|
|
2024-09-05 21:46:49 +10:00
|
|
|
public protocol CoherentNoiseTableInit: CoherentNoise {
|
|
|
|
init(permutation: [Int16])
|
|
|
|
}
|
|
|
|
|
2024-09-04 01:38:27 +10:00
|
|
|
public protocol CoherentNoise2D: CoherentNoise {
|
|
|
|
func get(_ point: SIMD2<Scalar>) -> Scalar
|
2024-08-29 03:56:54 +10:00
|
|
|
}
|
|
|
|
|
2024-09-04 01:38:27 +10:00
|
|
|
public protocol CoherentNoise3D: CoherentNoise {
|
|
|
|
func get(_ point: SIMD3<Scalar>) -> Scalar
|
|
|
|
}
|
2024-08-29 03:56:54 +10:00
|
|
|
|
2024-09-04 01:38:27 +10:00
|
|
|
public protocol CoherentNoise4D: CoherentNoise {
|
2024-08-29 03:56:54 +10:00
|
|
|
func get(_ point: SIMD4<Scalar>) -> Scalar
|
|
|
|
}
|