2024-09-03 15:38:27 +00:00
|
|
|
public protocol CoherentNoise {
|
2024-08-28 17:56:54 +00:00
|
|
|
associatedtype Scalar: FloatingPoint & SIMDScalar
|
|
|
|
|
2024-09-03 15:38:27 +00:00
|
|
|
init()
|
2024-08-28 17:56:54 +00:00
|
|
|
}
|
|
|
|
|
2024-09-03 15:38:27 +00:00
|
|
|
public protocol CoherentNoiseRandomInit: CoherentNoise {
|
|
|
|
init<Random: RandomProvider>(random: inout Random)
|
|
|
|
}
|
2024-08-28 17:56:54 +00:00
|
|
|
|
2024-09-03 15:38:27 +00:00
|
|
|
public protocol CoherentNoise2D: CoherentNoise {
|
|
|
|
func get(_ point: SIMD2<Scalar>) -> Scalar
|
2024-08-28 17:56:54 +00:00
|
|
|
}
|
|
|
|
|
2024-09-03 15:38:27 +00:00
|
|
|
public protocol CoherentNoise3D: CoherentNoise {
|
|
|
|
func get(_ point: SIMD3<Scalar>) -> Scalar
|
|
|
|
}
|
2024-08-28 17:56:54 +00:00
|
|
|
|
2024-09-03 15:38:27 +00:00
|
|
|
public protocol CoherentNoise4D: CoherentNoise {
|
2024-08-28 17:56:54 +00:00
|
|
|
func get(_ point: SIMD4<Scalar>) -> Scalar
|
|
|
|
}
|