Port FastNoiseLite gradient noise to pure Ziran

noise/fast_noise provides OpenSimplex2, OpenSimplex2S, Perlin, ValueCubic
and Value noise with FBm, Ridged and PingPong fractals and the 3D plane
rotations. The test compares 2112 values captured once from FastNoiseLite C.
This commit is contained in:
waozi committed 2026-11-07 00:42:46 -03:00
commit cd91ffaaae
9 files changed
+1091

No files matched your search

+2
View File
@@ -0,0 +1,2 @@
build/
ziran.local.toml
+27
View File
@@ -0,0 +1,27 @@
MIT License
Copyright (c) 2026, Waozi
Copyright (c) 2023 Jordan Peck ([email protected])
Copyright (c) 2023 Contributors
src/fast_noise.zi is a Ziran port of FastNoiseLite
(https://github.com/Auburn/FastNoiseLite), which is MIT licensed under the
copyright notices above.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+6
View File
@@ -0,0 +1,6 @@
ZIRAN ?= ziran
LOCKED := $(if $(wildcard ziran.local.toml),,--locked)
.PHONY: test
test:
$(ZIRAN) build --project $(LOCKED) --target=c --entry fast_noise_test:Main --exe -o build/tests tests/fast_noise_test.zi
env -u DISPLAY -u WAYLAND_DISPLAY build/tests/fast_noise_test
+30
View File
@@ -0,0 +1,30 @@
# noise
Gradient noise for Ziran, ported from
[FastNoiseLite](https://github.com/Auburn/FastNoiseLite) and written entirely
in Ziran. Results follow FastNoiseLite's C float32 implementation, so seeds
used with FastNoiseLite produce the same values.
```zi
FastNoise :: #import "noise/fast_noise";
state := FastNoise.NoiseCreate()
state.seed = 1337
state.noise_type = FastNoise.NoiseType.OpenSimplex2S
state.fractal_type = FastNoise.FractalType.FBm
state.octaves = 3
height := FastNoise.Noise2D(*state, x, z)
density := FastNoise.Noise3D(*state, x, y, z)
```
- Noise types: `OpenSimplex2`, `OpenSimplex2S`, `Perlin`, `ValueCubic`, `Value`
- Fractals: `None`, `FBm`, `Ridged`, `PingPong` (`octaves`, `lacunarity`,
`gain`, `weighted_strength`, `ping_pong_strength`)
- 3D rotation: `None`, `ImproveXYPlanes`, `ImproveXZPlanes`
`NoiseCreate()` returns FastNoiseLite's defaults. `Noise2D` and `Noise3D` only
read the state, so one state can be shared between threads.
`make test` compares 2112 values captured from FastNoiseLite C.
License: MIT, including the FastNoiseLite notice (see `LICENSE`).
+505
View File
@@ -0,0 +1,505 @@
// FastNoiseLite gradient noise in pure Ziran: OpenSimplex2, OpenSimplex2S,
// Perlin, ValueCubic and Value, with FBm, Ridged and PingPong fractals.
// Ported from FastNoiseLite 1.1 (MIT, Copyright (c) 2023 Jordan Peck and
// contributors, see LICENSE). Every call reads the state only, so one state
// can be shared between threads. Results follow the C float32 implementation.
NoiseType :: enum { OpenSimplex2; OpenSimplex2S; Perlin; ValueCubic; Value; }
FractalType :: enum { None; FBm; Ridged; PingPong; }
RotationType3D :: enum { None; ImproveXYPlanes; ImproveXZPlanes; }
NoiseState :: struct {
seed: s32;
frequency: float32;
noise_type: NoiseType;
rotation_type_3d: RotationType3D;
fractal_type: FractalType;
octaves: s32;
lacunarity: float32;
gain: float32;
weighted_strength: float32;
ping_pong_strength: float32;
}
// FastNoiseLite's defaults: seed 1337, frequency 0.01, OpenSimplex2, no
// fractal, 3 octaves, lacunarity 2, gain 0.5, ping-pong strength 2.
NoiseCreate :: () -> NoiseState {
state: NoiseState
state.seed = 1337
state.frequency = 0.01
state.noise_type = NoiseType.OpenSimplex2
state.rotation_type_3d = RotationType3D.None
state.fractal_type = FractalType.None
state.octaves = 3
state.lacunarity = 2.0
state.gain = 0.5
state.weighted_strength = 0.0
state.ping_pong_strength = 2.0
return state
}
Gradients2D: [256]float32 = .{
0.130526192220052, 0.99144486137381, 0.38268343236509, 0.923879532511287, 0.608761429008721, 0.793353340291235, 0.793353340291235, 0.608761429008721,
0.923879532511287, 0.38268343236509, 0.99144486137381, 0.130526192220051, 0.99144486137381, -0.130526192220051, 0.923879532511287, -0.38268343236509,
0.793353340291235, -0.60876142900872, 0.608761429008721, -0.793353340291235, 0.38268343236509, -0.923879532511287, 0.130526192220052, -0.99144486137381,
-0.130526192220052, -0.99144486137381, -0.38268343236509, -0.923879532511287, -0.608761429008721, -0.793353340291235, -0.793353340291235, -0.608761429008721,
-0.923879532511287, -0.38268343236509, -0.99144486137381, -0.130526192220052, -0.99144486137381, 0.130526192220051, -0.923879532511287, 0.38268343236509,
-0.793353340291235, 0.608761429008721, -0.608761429008721, 0.793353340291235, -0.38268343236509, 0.923879532511287, -0.130526192220052, 0.99144486137381,
0.130526192220052, 0.99144486137381, 0.38268343236509, 0.923879532511287, 0.608761429008721, 0.793353340291235, 0.793353340291235, 0.608761429008721,
0.923879532511287, 0.38268343236509, 0.99144486137381, 0.130526192220051, 0.99144486137381, -0.130526192220051, 0.923879532511287, -0.38268343236509,
0.793353340291235, -0.60876142900872, 0.608761429008721, -0.793353340291235, 0.38268343236509, -0.923879532511287, 0.130526192220052, -0.99144486137381,
-0.130526192220052, -0.99144486137381, -0.38268343236509, -0.923879532511287, -0.608761429008721, -0.793353340291235, -0.793353340291235, -0.608761429008721,
-0.923879532511287, -0.38268343236509, -0.99144486137381, -0.130526192220052, -0.99144486137381, 0.130526192220051, -0.923879532511287, 0.38268343236509,
-0.793353340291235, 0.608761429008721, -0.608761429008721, 0.793353340291235, -0.38268343236509, 0.923879532511287, -0.130526192220052, 0.99144486137381,
0.130526192220052, 0.99144486137381, 0.38268343236509, 0.923879532511287, 0.608761429008721, 0.793353340291235, 0.793353340291235, 0.608761429008721,
0.923879532511287, 0.38268343236509, 0.99144486137381, 0.130526192220051, 0.99144486137381, -0.130526192220051, 0.923879532511287, -0.38268343236509,
0.793353340291235, -0.60876142900872, 0.608761429008721, -0.793353340291235, 0.38268343236509, -0.923879532511287, 0.130526192220052, -0.99144486137381,
-0.130526192220052, -0.99144486137381, -0.38268343236509, -0.923879532511287, -0.608761429008721, -0.793353340291235, -0.793353340291235, -0.608761429008721,
-0.923879532511287, -0.38268343236509, -0.99144486137381, -0.130526192220052, -0.99144486137381, 0.130526192220051, -0.923879532511287, 0.38268343236509,
-0.793353340291235, 0.608761429008721, -0.608761429008721, 0.793353340291235, -0.38268343236509, 0.923879532511287, -0.130526192220052, 0.99144486137381,
0.130526192220052, 0.99144486137381, 0.38268343236509, 0.923879532511287, 0.608761429008721, 0.793353340291235, 0.793353340291235, 0.608761429008721,
0.923879532511287, 0.38268343236509, 0.99144486137381, 0.130526192220051, 0.99144486137381, -0.130526192220051, 0.923879532511287, -0.38268343236509,
0.793353340291235, -0.60876142900872, 0.608761429008721, -0.793353340291235, 0.38268343236509, -0.923879532511287, 0.130526192220052, -0.99144486137381,
-0.130526192220052, -0.99144486137381, -0.38268343236509, -0.923879532511287, -0.608761429008721, -0.793353340291235, -0.793353340291235, -0.608761429008721,
-0.923879532511287, -0.38268343236509, -0.99144486137381, -0.130526192220052, -0.99144486137381, 0.130526192220051, -0.923879532511287, 0.38268343236509,
-0.793353340291235, 0.608761429008721, -0.608761429008721, 0.793353340291235, -0.38268343236509, 0.923879532511287, -0.130526192220052, 0.99144486137381,
0.130526192220052, 0.99144486137381, 0.38268343236509, 0.923879532511287, 0.608761429008721, 0.793353340291235, 0.793353340291235, 0.608761429008721,
0.923879532511287, 0.38268343236509, 0.99144486137381, 0.130526192220051, 0.99144486137381, -0.130526192220051, 0.923879532511287, -0.38268343236509,
0.793353340291235, -0.60876142900872, 0.608761429008721, -0.793353340291235, 0.38268343236509, -0.923879532511287, 0.130526192220052, -0.99144486137381,
-0.130526192220052, -0.99144486137381, -0.38268343236509, -0.923879532511287, -0.608761429008721, -0.793353340291235, -0.793353340291235, -0.608761429008721,
-0.923879532511287, -0.38268343236509, -0.99144486137381, -0.130526192220052, -0.99144486137381, 0.130526192220051, -0.923879532511287, 0.38268343236509,
-0.793353340291235, 0.608761429008721, -0.608761429008721, 0.793353340291235, -0.38268343236509, 0.923879532511287, -0.130526192220052, 0.99144486137381,
0.38268343236509, 0.923879532511287, 0.923879532511287, 0.38268343236509, 0.923879532511287, -0.38268343236509, 0.38268343236509, -0.923879532511287,
-0.38268343236509, -0.923879532511287, -0.923879532511287, -0.38268343236509, -0.923879532511287, 0.38268343236509, -0.38268343236509, 0.923879532511287
};
Gradients3D: [256]float32 = .{
0, 1, 1, 0, 0, -1, 1, 0,
0, 1, -1, 0, 0, -1, -1, 0,
1, 0, 1, 0, -1, 0, 1, 0,
1, 0, -1, 0, -1, 0, -1, 0,
1, 1, 0, 0, -1, 1, 0, 0,
1, -1, 0, 0, -1, -1, 0, 0,
0, 1, 1, 0, 0, -1, 1, 0,
0, 1, -1, 0, 0, -1, -1, 0,
1, 0, 1, 0, -1, 0, 1, 0,
1, 0, -1, 0, -1, 0, -1, 0,
1, 1, 0, 0, -1, 1, 0, 0,
1, -1, 0, 0, -1, -1, 0, 0,
0, 1, 1, 0, 0, -1, 1, 0,
0, 1, -1, 0, 0, -1, -1, 0,
1, 0, 1, 0, -1, 0, 1, 0,
1, 0, -1, 0, -1, 0, -1, 0,
1, 1, 0, 0, -1, 1, 0, 0,
1, -1, 0, 0, -1, -1, 0, 0,
0, 1, 1, 0, 0, -1, 1, 0,
0, 1, -1, 0, 0, -1, -1, 0,
1, 0, 1, 0, -1, 0, 1, 0,
1, 0, -1, 0, -1, 0, -1, 0,
1, 1, 0, 0, -1, 1, 0, 0,
1, -1, 0, 0, -1, -1, 0, 0,
0, 1, 1, 0, 0, -1, 1, 0,
0, 1, -1, 0, 0, -1, -1, 0,
1, 0, 1, 0, -1, 0, 1, 0,
1, 0, -1, 0, -1, 0, -1, 0,
1, 1, 0, 0, -1, 1, 0, 0,
1, -1, 0, 0, -1, -1, 0, 0,
1, 1, 0, 0, 0, -1, 1, 0,
-1, 1, 0, 0, 0, -1, -1, 0
};
PRIME_X :: 501125321;
PRIME_Y :: 1136930381;
PRIME_Z :: 1720413743;
// The primes doubled, wrapped to s32 as FastNoiseLite's int shifts do.
PRIME_X2 :: 1002250642;
PRIME_Y2 :: -2021106534;
PRIME_Z2 :: -854139810;
Min :: (a: float32, b: float32) -> float32 { if a < b { return a }; return b }
Abs :: (f: float32) -> float32 { if f < 0 { return -f }; return f }
// FastNoiseLite's floor and round: negative integers step down one more,
// which the generated lattice depends on.
FastFloor :: (f: float32) -> s32 { if f >= 0 { return cast(s32) f }; return cast(s32) f - 1 }
FastRound :: (f: float32) -> s32 { if f >= 0 { return cast(s32) (f + 0.5) }; return cast(s32) (f - 0.5) }
Lerp :: (a: float32, b: float32, t: float32) -> float32 { return a + t * (b - a) }
InterpHermite :: (t: float32) -> float32 { return t * t * (3 - 2 * t) }
InterpQuintic :: (t: float32) -> float32 { return t * t * t * (t * (t * 6 - 15) + 10) }
CubicLerp :: (a: float32, b: float32, c: float32, d: float32, t: float32) -> float32 {
p := (d - c) - (a - b)
return t * t * t * p + t * t * ((a - b) - p) + t * (c - a) + b
}
PingPong :: (value: float32) -> float32 {
t := value - cast(float32) (cast(s32) (value * 0.5) * 2)
if t < 1 { return t }; return 2 - t
}
FractalBounding :: (state: *NoiseState) -> float32 {
gain := Abs(state.gain); amp := gain; fractal: float32 = 1.0; i: s32 = 1
while i < state.octaves { fractal += amp; amp *= gain; i += 1 }
return 1.0 / fractal
}
Hash2D :: (seed: s32, x: s32, y: s32) -> s32 { return (seed ^ x ^ y) * 0x27d4eb2d }
Hash3D :: (seed: s32, x: s32, y: s32, z: s32) -> s32 { return (seed ^ x ^ y ^ z) * 0x27d4eb2d }
ValCoord2D :: (seed: s32, x: s32, y: s32) -> float32 {
hash := Hash2D(seed, x, y); hash *= hash; hash ^= hash << 19
return cast(float32) hash * (1.0 / 2147483648.0)
}
ValCoord3D :: (seed: s32, x: s32, y: s32, z: s32) -> float32 {
hash := Hash3D(seed, x, y, z); hash *= hash; hash ^= hash << 19
return cast(float32) hash * (1.0 / 2147483648.0)
}
GradCoord2D :: (seed: s32, x: s32, y: s32, xd: float32, yd: float32) -> float32 {
hash := Hash2D(seed, x, y); hash ^= hash >> 15; hash &= 127 << 1
return xd * Gradients2D[hash] + yd * Gradients2D[hash | 1]
}
GradCoord3D :: (seed: s32, x: s32, y: s32, z: s32, xd: float32, yd: float32, zd: float32) -> float32 {
hash := Hash3D(seed, x, y, z); hash ^= hash >> 15; hash &= 63 << 2
return xd * Gradients3D[hash] + yd * Gradients3D[hash | 1] + zd * Gradients3D[hash | 2]
}
// OpenSimplex2 in 2D is ordinary simplex noise on the skewed coordinates.
Simplex2D :: (seed: s32, x: float32, y: float32) -> float32 {
SQRT3: float32 = 1.7320508075688772935274463415059
G2 := (3 - SQRT3) / 6
i := FastFloor(x); j := FastFloor(y)
xi := x - cast(float32) i; yi := y - cast(float32) j
t := (xi + yi) * G2; x0 := xi - t; y0 := yi - t
i *= PRIME_X; j *= PRIME_Y
n0: float32 = 0; n1: float32 = 0; n2: float32 = 0
a := 0.5 - x0 * x0 - y0 * y0
if a > 0 { n0 = (a * a) * (a * a) * GradCoord2D(seed, i, j, x0, y0) }
c := (2 * (1 - 2 * G2) * (1 / G2 - 2)) * t + ((-2 * (1 - 2 * G2) * (1 - 2 * G2)) + a)
if c > 0 {
x2 := x0 + (2 * G2 - 1); y2 := y0 + (2 * G2 - 1)
n2 = (c * c) * (c * c) * GradCoord2D(seed, i + PRIME_X, j + PRIME_Y, x2, y2)
}
if y0 > x0 {
x1 := x0 + G2; y1 := y0 + (G2 - 1); b := 0.5 - x1 * x1 - y1 * y1
if b > 0 { n1 = (b * b) * (b * b) * GradCoord2D(seed, i, j + PRIME_Y, x1, y1) }
} else {
x1 := x0 + (G2 - 1); y1 := y0 + G2; b := 0.5 - x1 * x1 - y1 * y1
if b > 0 { n1 = (b * b) * (b * b) * GradCoord2D(seed, i + PRIME_X, j, x1, y1) }
}
return (n0 + n1 + n2) * 99.83685446303647
}
// OpenSimplex2 in 3D: two offset, rotated cube grids.
OpenSimplex23D :: (seed: s32, x: float32, y: float32, z: float32) -> float32 {
i := FastRound(x); j := FastRound(y); k := FastRound(z)
x0 := x - cast(float32) i; y0 := y - cast(float32) j; z0 := z - cast(float32) k
xNSign := cast(s32) (-1.0 - x0) | 1; yNSign := cast(s32) (-1.0 - y0) | 1; zNSign := cast(s32) (-1.0 - z0) | 1
ax0 := cast(float32) xNSign * -x0; ay0 := cast(float32) yNSign * -y0; az0 := cast(float32) zNSign * -z0
i *= PRIME_X; j *= PRIME_Y; k *= PRIME_Z
s := seed; value: float32 = 0
a := (0.6 - x0 * x0) - (y0 * y0 + z0 * z0)
l: s32 = 0
while true {
if a > 0 { value += (a * a) * (a * a) * GradCoord3D(s, i, j, k, x0, y0, z0) }
b := a + 1; i1 := i; j1 := j; k1 := k; x1 := x0; y1 := y0; z1 := z0
if ax0 >= ay0 && ax0 >= az0 {
x1 += cast(float32) xNSign; b -= cast(float32) (xNSign * 2) * x1; i1 -= xNSign * PRIME_X
} else if ay0 > ax0 && ay0 >= az0 {
y1 += cast(float32) yNSign; b -= cast(float32) (yNSign * 2) * y1; j1 -= yNSign * PRIME_Y
} else {
z1 += cast(float32) zNSign; b -= cast(float32) (zNSign * 2) * z1; k1 -= zNSign * PRIME_Z
}
if b > 0 { value += (b * b) * (b * b) * GradCoord3D(s, i1, j1, k1, x1, y1, z1) }
if l == 1 { break }
ax0 = 0.5 - ax0; ay0 = 0.5 - ay0; az0 = 0.5 - az0
x0 = cast(float32) xNSign * ax0; y0 = cast(float32) yNSign * ay0; z0 = cast(float32) zNSign * az0
a += (0.75 - ax0) - (ay0 + az0)
i += (xNSign >> 1) & PRIME_X; j += (yNSign >> 1) & PRIME_Y; k += (zNSign >> 1) & PRIME_Z
xNSign = -xNSign; yNSign = -yNSign; zNSign = -zNSign
s = ~s; l += 1
}
return value * 32.69428253173828125
}
// OpenSimplex2S in 2D: a smoother simplex variant with a wider kernel.
OpenSimplex2S2D :: (seed: s32, x: float32, y: float32) -> float32 {
SQRT3: float32 = 1.7320508075688772935274463415059
G2 := (3 - SQRT3) / 6
i := FastFloor(x); j := FastFloor(y)
xi := x - cast(float32) i; yi := y - cast(float32) j
i *= PRIME_X; j *= PRIME_Y
i1 := i + PRIME_X; j1 := j + PRIME_Y
t := (xi + yi) * G2; x0 := xi - t; y0 := yi - t
a0 := (2.0 / 3.0) - x0 * x0 - y0 * y0
value := (a0 * a0) * (a0 * a0) * GradCoord2D(seed, i, j, x0, y0)
a1 := (2 * (1 - 2 * G2) * (1 / G2 - 2)) * t + ((-2 * (1 - 2 * G2) * (1 - 2 * G2)) + a0)
x1 := x0 - (1 - 2 * G2); y1 := y0 - (1 - 2 * G2)
value += (a1 * a1) * (a1 * a1) * GradCoord2D(seed, i1, j1, x1, y1)
xmyi := xi - yi
if t > G2 {
if xi + xmyi > 1 {
x2 := x0 + (3 * G2 - 2); y2 := y0 + (3 * G2 - 1); a2 := (2.0 / 3.0) - x2 * x2 - y2 * y2
if a2 > 0 { value += (a2 * a2) * (a2 * a2) * GradCoord2D(seed, i + PRIME_X2, j + PRIME_Y, x2, y2) }
} else {
x2 := x0 + G2; y2 := y0 + (G2 - 1); a2 := (2.0 / 3.0) - x2 * x2 - y2 * y2
if a2 > 0 { value += (a2 * a2) * (a2 * a2) * GradCoord2D(seed, i, j + PRIME_Y, x2, y2) }
}
if yi - xmyi > 1 {
x3 := x0 + (3 * G2 - 1); y3 := y0 + (3 * G2 - 2); a3 := (2.0 / 3.0) - x3 * x3 - y3 * y3
if a3 > 0 { value += (a3 * a3) * (a3 * a3) * GradCoord2D(seed, i + PRIME_X, j + PRIME_Y2, x3, y3) }
} else {
x3 := x0 + (G2 - 1); y3 := y0 + G2; a3 := (2.0 / 3.0) - x3 * x3 - y3 * y3
if a3 > 0 { value += (a3 * a3) * (a3 * a3) * GradCoord2D(seed, i + PRIME_X, j, x3, y3) }
}
} else {
if xi + xmyi < 0 {
x2 := x0 + (1 - G2); y2 := y0 - G2; a2 := (2.0 / 3.0) - x2 * x2 - y2 * y2
if a2 > 0 { value += (a2 * a2) * (a2 * a2) * GradCoord2D(seed, i - PRIME_X, j, x2, y2) }
} else {
x2 := x0 + (G2 - 1); y2 := y0 + G2; a2 := (2.0 / 3.0) - x2 * x2 - y2 * y2
if a2 > 0 { value += (a2 * a2) * (a2 * a2) * GradCoord2D(seed, i + PRIME_X, j, x2, y2) }
}
if yi < xmyi {
x2 := x0 - G2; y2 := y0 - (G2 - 1); a2 := (2.0 / 3.0) - x2 * x2 - y2 * y2
if a2 > 0 { value += (a2 * a2) * (a2 * a2) * GradCoord2D(seed, i, j - PRIME_Y, x2, y2) }
} else {
x2 := x0 + G2; y2 := y0 + (G2 - 1); a2 := (2.0 / 3.0) - x2 * x2 - y2 * y2
if a2 > 0 { value += (a2 * a2) * (a2 * a2) * GradCoord2D(seed, i, j + PRIME_Y, x2, y2) }
}
}
return value * 18.24196194486065
}
// OpenSimplex2S in 3D: two offset, rotated cube grids with a wider kernel.
OpenSimplex2S3D :: (seed: s32, x: float32, y: float32, z: float32) -> float32 {
i := FastFloor(x); j := FastFloor(y); k := FastFloor(z)
xi := x - cast(float32) i; yi := y - cast(float32) j; zi := z - cast(float32) k
i *= PRIME_X; j *= PRIME_Y; k *= PRIME_Z
seed2 := seed + 1293373
xNMask := cast(s32) (-0.5 - xi); yNMask := cast(s32) (-0.5 - yi); zNMask := cast(s32) (-0.5 - zi)
x0 := xi + cast(float32) xNMask; y0 := yi + cast(float32) yNMask; z0 := zi + cast(float32) zNMask
a0 := 0.75 - x0 * x0 - y0 * y0 - z0 * z0
value := (a0 * a0) * (a0 * a0) * GradCoord3D(seed, i + (xNMask & PRIME_X), j + (yNMask & PRIME_Y), k + (zNMask & PRIME_Z), x0, y0, z0)
x1 := xi - 0.5; y1 := yi - 0.5; z1 := zi - 0.5
a1 := 0.75 - x1 * x1 - y1 * y1 - z1 * z1
value += (a1 * a1) * (a1 * a1) * GradCoord3D(seed2, i + PRIME_X, j + PRIME_Y, k + PRIME_Z, x1, y1, z1)
xSign := cast(float32) (xNMask | 1); ySign := cast(float32) (yNMask | 1); zSign := cast(float32) (zNMask | 1)
xAFlipMask0 := cast(float32) ((xNMask | 1) << 1) * x1
yAFlipMask0 := cast(float32) ((yNMask | 1) << 1) * y1
zAFlipMask0 := cast(float32) ((zNMask | 1) << 1) * z1
xAFlipMask1 := cast(float32) (-2 - (xNMask << 2)) * x1 - 1.0
yAFlipMask1 := cast(float32) (-2 - (yNMask << 2)) * y1 - 1.0
zAFlipMask1 := cast(float32) (-2 - (zNMask << 2)) * z1 - 1.0
skip5 := false
a2 := xAFlipMask0 + a0
if a2 > 0 {
value += (a2 * a2) * (a2 * a2) * GradCoord3D(seed, i + (~xNMask & PRIME_X), j + (yNMask & PRIME_Y), k + (zNMask & PRIME_Z), x0 - xSign, y0, z0)
} else {
a3 := yAFlipMask0 + zAFlipMask0 + a0
if a3 > 0 { value += (a3 * a3) * (a3 * a3) * GradCoord3D(seed, i + (xNMask & PRIME_X), j + (~yNMask & PRIME_Y), k + (~zNMask & PRIME_Z), x0, y0 - ySign, z0 - zSign) }
a4 := xAFlipMask1 + a1
if a4 > 0 {
value += (a4 * a4) * (a4 * a4) * GradCoord3D(seed2, i + (xNMask & PRIME_X2), j + PRIME_Y, k + PRIME_Z, xSign + x1, y1, z1)
skip5 = true
}
}
skip9 := false
a6 := yAFlipMask0 + a0
if a6 > 0 {
value += (a6 * a6) * (a6 * a6) * GradCoord3D(seed, i + (xNMask & PRIME_X), j + (~yNMask & PRIME_Y), k + (zNMask & PRIME_Z), x0, y0 - ySign, z0)
} else {
a7 := xAFlipMask0 + zAFlipMask0 + a0
if a7 > 0 { value += (a7 * a7) * (a7 * a7) * GradCoord3D(seed, i + (~xNMask & PRIME_X), j + (yNMask & PRIME_Y), k + (~zNMask & PRIME_Z), x0 - xSign, y0, z0 - zSign) }
a8 := yAFlipMask1 + a1
if a8 > 0 {
value += (a8 * a8) * (a8 * a8) * GradCoord3D(seed2, i + PRIME_X, j + (yNMask & PRIME_Y2), k + PRIME_Z, x1, ySign + y1, z1)
skip9 = true
}
}
skipD := false
aA := zAFlipMask0 + a0
if aA > 0 {
value += (aA * aA) * (aA * aA) * GradCoord3D(seed, i + (xNMask & PRIME_X), j + (yNMask & PRIME_Y), k + (~zNMask & PRIME_Z), x0, y0, z0 - zSign)
} else {
aB := xAFlipMask0 + yAFlipMask0 + a0
if aB > 0 { value += (aB * aB) * (aB * aB) * GradCoord3D(seed, i + (~xNMask & PRIME_X), j + (~yNMask & PRIME_Y), k + (zNMask & PRIME_Z), x0 - xSign, y0 - ySign, z0) }
aC := zAFlipMask1 + a1
if aC > 0 {
value += (aC * aC) * (aC * aC) * GradCoord3D(seed2, i + PRIME_X, j + PRIME_Y, k + (zNMask & PRIME_Z2), x1, y1, zSign + z1)
skipD = true
}
}
if !skip5 {
a5 := yAFlipMask1 + zAFlipMask1 + a1
if a5 > 0 { value += (a5 * a5) * (a5 * a5) * GradCoord3D(seed2, i + PRIME_X, j + (yNMask & PRIME_Y2), k + (zNMask & PRIME_Z2), x1, ySign + y1, zSign + z1) }
}
if !skip9 {
a9 := xAFlipMask1 + zAFlipMask1 + a1
if a9 > 0 { value += (a9 * a9) * (a9 * a9) * GradCoord3D(seed2, i + (xNMask & PRIME_X2), j + PRIME_Y, k + (zNMask & PRIME_Z2), xSign + x1, y1, zSign + z1) }
}
if !skipD {
aD := xAFlipMask1 + yAFlipMask1 + a1
if aD > 0 { value += (aD * aD) * (aD * aD) * GradCoord3D(seed2, i + (xNMask & PRIME_X2), j + (yNMask & PRIME_Y2), k + PRIME_Z, xSign + x1, ySign + y1, z1) }
}
return value * 9.046026385208288
}
Perlin2D :: (seed: s32, x: float32, y: float32) -> float32 {
x0 := FastFloor(x); y0 := FastFloor(y)
xd0 := x - cast(float32) x0; yd0 := y - cast(float32) y0; xd1 := xd0 - 1; yd1 := yd0 - 1
xs := InterpQuintic(xd0); ys := InterpQuintic(yd0)
x0 *= PRIME_X; y0 *= PRIME_Y; x1 := x0 + PRIME_X; y1 := y0 + PRIME_Y
xf0 := Lerp(GradCoord2D(seed, x0, y0, xd0, yd0), GradCoord2D(seed, x1, y0, xd1, yd0), xs)
xf1 := Lerp(GradCoord2D(seed, x0, y1, xd0, yd1), GradCoord2D(seed, x1, y1, xd1, yd1), xs)
return Lerp(xf0, xf1, ys) * 1.4247691104677813
}
Perlin3D :: (seed: s32, x: float32, y: float32, z: float32) -> float32 {
x0 := FastFloor(x); y0 := FastFloor(y); z0 := FastFloor(z)
xd0 := x - cast(float32) x0; yd0 := y - cast(float32) y0; zd0 := z - cast(float32) z0
xd1 := xd0 - 1; yd1 := yd0 - 1; zd1 := zd0 - 1
xs := InterpQuintic(xd0); ys := InterpQuintic(yd0); zs := InterpQuintic(zd0)
x0 *= PRIME_X; y0 *= PRIME_Y; z0 *= PRIME_Z; x1 := x0 + PRIME_X; y1 := y0 + PRIME_Y; z1 := z0 + PRIME_Z
xf00 := Lerp(GradCoord3D(seed, x0, y0, z0, xd0, yd0, zd0), GradCoord3D(seed, x1, y0, z0, xd1, yd0, zd0), xs)
xf10 := Lerp(GradCoord3D(seed, x0, y1, z0, xd0, yd1, zd0), GradCoord3D(seed, x1, y1, z0, xd1, yd1, zd0), xs)
xf01 := Lerp(GradCoord3D(seed, x0, y0, z1, xd0, yd0, zd1), GradCoord3D(seed, x1, y0, z1, xd1, yd0, zd1), xs)
xf11 := Lerp(GradCoord3D(seed, x0, y1, z1, xd0, yd1, zd1), GradCoord3D(seed, x1, y1, z1, xd1, yd1, zd1), xs)
return Lerp(Lerp(xf00, xf10, ys), Lerp(xf01, xf11, ys), zs) * 0.964921414852142333984375
}
ValueCubicRow2D :: (seed: s32, x0: s32, x1: s32, x2: s32, x3: s32, y: s32, t: float32) -> float32 {
return CubicLerp(ValCoord2D(seed, x0, y), ValCoord2D(seed, x1, y), ValCoord2D(seed, x2, y), ValCoord2D(seed, x3, y), t)
}
ValueCubic2D :: (seed: s32, x: float32, y: float32) -> float32 {
x1 := FastFloor(x); y1 := FastFloor(y)
xs := x - cast(float32) x1; ys := y - cast(float32) y1
x1 *= PRIME_X; y1 *= PRIME_Y
x0 := x1 - PRIME_X; y0 := y1 - PRIME_Y; x2 := x1 + PRIME_X; y2 := y1 + PRIME_Y; x3 := x1 + PRIME_X2; y3 := y1 + PRIME_Y2
return CubicLerp(ValueCubicRow2D(seed, x0, x1, x2, x3, y0, xs), ValueCubicRow2D(seed, x0, x1, x2, x3, y1, xs),
ValueCubicRow2D(seed, x0, x1, x2, x3, y2, xs), ValueCubicRow2D(seed, x0, x1, x2, x3, y3, xs), ys) * (1 / (1.5 * 1.5))
}
ValueCubicRow3D :: (seed: s32, x0: s32, x1: s32, x2: s32, x3: s32, y: s32, z: s32, t: float32) -> float32 {
return CubicLerp(ValCoord3D(seed, x0, y, z), ValCoord3D(seed, x1, y, z), ValCoord3D(seed, x2, y, z), ValCoord3D(seed, x3, y, z), t)
}
ValueCubicPlane3D :: (seed: s32, x0: s32, x1: s32, x2: s32, x3: s32, y0: s32, y1: s32, y2: s32, y3: s32, z: s32, xs: float32, ys: float32) -> float32 {
return CubicLerp(ValueCubicRow3D(seed, x0, x1, x2, x3, y0, z, xs), ValueCubicRow3D(seed, x0, x1, x2, x3, y1, z, xs),
ValueCubicRow3D(seed, x0, x1, x2, x3, y2, z, xs), ValueCubicRow3D(seed, x0, x1, x2, x3, y3, z, xs), ys)
}
ValueCubic3D :: (seed: s32, x: float32, y: float32, z: float32) -> float32 {
x1 := FastFloor(x); y1 := FastFloor(y); z1 := FastFloor(z)
xs := x - cast(float32) x1; ys := y - cast(float32) y1; zs := z - cast(float32) z1
x1 *= PRIME_X; y1 *= PRIME_Y; z1 *= PRIME_Z
x0 := x1 - PRIME_X; y0 := y1 - PRIME_Y; z0 := z1 - PRIME_Z
x2 := x1 + PRIME_X; y2 := y1 + PRIME_Y; z2 := z1 + PRIME_Z
x3 := x1 + PRIME_X2; y3 := y1 + PRIME_Y2; z3 := z1 + PRIME_Z2
return CubicLerp(ValueCubicPlane3D(seed, x0, x1, x2, x3, y0, y1, y2, y3, z0, xs, ys), ValueCubicPlane3D(seed, x0, x1, x2, x3, y0, y1, y2, y3, z1, xs, ys),
ValueCubicPlane3D(seed, x0, x1, x2, x3, y0, y1, y2, y3, z2, xs, ys), ValueCubicPlane3D(seed, x0, x1, x2, x3, y0, y1, y2, y3, z3, xs, ys), zs) * (1 / (1.5 * 1.5 * 1.5))
}
Value2D :: (seed: s32, x: float32, y: float32) -> float32 {
x0 := FastFloor(x); y0 := FastFloor(y)
xs := InterpHermite(x - cast(float32) x0); ys := InterpHermite(y - cast(float32) y0)
x0 *= PRIME_X; y0 *= PRIME_Y; x1 := x0 + PRIME_X; y1 := y0 + PRIME_Y
xf0 := Lerp(ValCoord2D(seed, x0, y0), ValCoord2D(seed, x1, y0), xs)
xf1 := Lerp(ValCoord2D(seed, x0, y1), ValCoord2D(seed, x1, y1), xs)
return Lerp(xf0, xf1, ys)
}
Value3D :: (seed: s32, x: float32, y: float32, z: float32) -> float32 {
x0 := FastFloor(x); y0 := FastFloor(y); z0 := FastFloor(z)
xs := InterpHermite(x - cast(float32) x0); ys := InterpHermite(y - cast(float32) y0); zs := InterpHermite(z - cast(float32) z0)
x0 *= PRIME_X; y0 *= PRIME_Y; z0 *= PRIME_Z; x1 := x0 + PRIME_X; y1 := y0 + PRIME_Y; z1 := z0 + PRIME_Z
xf00 := Lerp(ValCoord3D(seed, x0, y0, z0), ValCoord3D(seed, x1, y0, z0), xs)
xf10 := Lerp(ValCoord3D(seed, x0, y1, z0), ValCoord3D(seed, x1, y1, z0), xs)
xf01 := Lerp(ValCoord3D(seed, x0, y0, z1), ValCoord3D(seed, x1, y0, z1), xs)
xf11 := Lerp(ValCoord3D(seed, x0, y1, z1), ValCoord3D(seed, x1, y1, z1), xs)
return Lerp(Lerp(xf00, xf10, ys), Lerp(xf01, xf11, ys), zs)
}
Single2D :: (state: *NoiseState, seed: s32, x: float32, y: float32) -> float32 {
kind := state.noise_type
if kind == NoiseType.OpenSimplex2 { return Simplex2D(seed, x, y) }
if kind == NoiseType.OpenSimplex2S { return OpenSimplex2S2D(seed, x, y) }
if kind == NoiseType.Perlin { return Perlin2D(seed, x, y) }
if kind == NoiseType.ValueCubic { return ValueCubic2D(seed, x, y) }
if kind == NoiseType.Value { return Value2D(seed, x, y) }
return 0
}
Single3D :: (state: *NoiseState, seed: s32, x: float32, y: float32, z: float32) -> float32 {
kind := state.noise_type
if kind == NoiseType.OpenSimplex2 { return OpenSimplex23D(seed, x, y, z) }
if kind == NoiseType.OpenSimplex2S { return OpenSimplex2S3D(seed, x, y, z) }
if kind == NoiseType.Perlin { return Perlin3D(seed, x, y, z) }
if kind == NoiseType.ValueCubic { return ValueCubic3D(seed, x, y, z) }
if kind == NoiseType.Value { return Value3D(seed, x, y, z) }
return 0
}
// A fractal's running sum and the amplitude of its next octave.
Fractal :: struct { sum: float32; amp: float32; }
// Adds one octave. FastNoiseLite caps the 2D FBm weight at noise + 1 <= 2
// but not the 3D one, so CAPPED selects the 2D form.
Octave :: (state: *NoiseState, noise: float32, fractal: *Fractal, capped: bool) {
kind := state.fractal_type
if kind == FractalType.FBm {
fractal.sum += noise * fractal.amp
weight := (noise + 1) * 0.5
if capped { weight = Min(noise + 1, 2) * 0.5 }
fractal.amp *= Lerp(1.0, weight, state.weighted_strength)
} else if kind == FractalType.Ridged {
ridge := Abs(noise)
fractal.sum += (ridge * -2 + 1) * fractal.amp
fractal.amp *= Lerp(1.0, 1 - ridge, state.weighted_strength)
} else {
bounce := PingPong((noise + 1) * state.ping_pong_strength)
fractal.sum += (bounce - 0.5) * 2 * fractal.amp
fractal.amp *= Lerp(1.0, bounce, state.weighted_strength)
}
fractal.amp *= state.gain
}
// Noise at (x, y), in about -1 to 1.
Noise2D :: (state: *NoiseState, x: float32, y: float32) -> float32 {
px := x * state.frequency; py := y * state.frequency
if state.noise_type == NoiseType.OpenSimplex2 || state.noise_type == NoiseType.OpenSimplex2S {
SQRT3: float32 = 1.7320508075688772935274463415059
F2 := 0.5 * (SQRT3 - 1)
t := (px + py) * F2; px += t; py += t
}
if state.fractal_type == FractalType.None { return Single2D(state, state.seed, px, py) }
fractal: Fractal; fractal.amp = FractalBounding(state); seed := state.seed; i: s32 = 0
while i < state.octaves {
Octave(state, Single2D(state, seed, px, py), *fractal, true)
seed += 1; px *= state.lacunarity; py *= state.lacunarity; i += 1
}
return fractal.sum
}
// Noise at (x, y, z), in about -1 to 1.
Noise3D :: (state: *NoiseState, x: float32, y: float32, z: float32) -> float32 {
px := x * state.frequency; py := y * state.frequency; pz := z * state.frequency
if state.rotation_type_3d == RotationType3D.ImproveXYPlanes {
S2: float32 = -0.211324865405187; R: float32 = 0.577350269189626
xy := px + py; s2 := xy * S2
pz *= R; px += s2 - pz; py = py + s2 - pz; pz += xy * R
} else if state.rotation_type_3d == RotationType3D.ImproveXZPlanes {
S2: float32 = -0.211324865405187; R: float32 = 0.577350269189626
xz := px + pz; s2 := xz * S2
py *= R; px += s2 - py; pz += s2 - py; py += xz * R
} else if state.noise_type == NoiseType.OpenSimplex2 || state.noise_type == NoiseType.OpenSimplex2S {
R3: float32 = 2.0 / 3.0
r := (px + py + pz) * R3
px = r - px; py = r - py; pz = r - pz
}
if state.fractal_type == FractalType.None { return Single3D(state, state.seed, px, py, pz) }
fractal: Fractal; fractal.amp = FractalBounding(state); seed := state.seed; i: s32 = 0
while i < state.octaves {
Octave(state, Single3D(state, seed, px, py, pz), *fractal, false)
seed += 1; px *= state.lacunarity; py *= state.lacunarity; pz *= state.lacunarity; i += 1
}
return fractal.sum
}
+80
View File
@@ -0,0 +1,80 @@
// Compares noise/fast_noise with values captured once from FastNoiseLite C:
// OpenSimplex2S FBm (octaves 1-3, lacunarity 1 and 2, gain 0.5, 0.75 and 1),
// Ridged and PingPong, plus OpenSimplex2, Perlin, ValueCubic, Value, weighted
// strength, both 3D plane rotations and seed wraparound at 2^31 - 1.
FastNoise :: #import "fast_noise";
Vectors :: #import "fast_noise_vectors";
TOLERANCE :: 0.000001;
NoiseTypeAt :: (index: s32) -> FastNoise.NoiseType {
if index == 0 { return FastNoise.NoiseType.OpenSimplex2 }
if index == 1 { return FastNoise.NoiseType.OpenSimplex2S }
if index == 2 { return FastNoise.NoiseType.Perlin }
if index == 3 { return FastNoise.NoiseType.ValueCubic }
return FastNoise.NoiseType.Value
}
FractalTypeAt :: (index: s32) -> FastNoise.FractalType {
if index == 1 { return FastNoise.FractalType.FBm }
if index == 2 { return FastNoise.FractalType.Ridged }
if index == 3 { return FastNoise.FractalType.PingPong }
return FastNoise.FractalType.None
}
RotationAt :: (index: s32) -> FastNoise.RotationType3D {
if index == 1 { return FastNoise.RotationType3D.ImproveXYPlanes }
if index == 2 { return FastNoise.RotationType3D.ImproveXZPlanes }
return FastNoise.RotationType3D.None
}
Configure :: (index: s32) -> FastNoise.NoiseState {
state := FastNoise.NoiseCreate()
state.noise_type = NoiseTypeAt(Vectors.ConfigType[index])
state.fractal_type = FractalTypeAt(Vectors.ConfigFractal[index])
state.rotation_type_3d = RotationAt(Vectors.ConfigRotation[index])
state.octaves = Vectors.ConfigOctaves[index]
state.seed = Vectors.ConfigSeed[index]
state.lacunarity = Vectors.ConfigLacunarity[index]
state.gain = Vectors.ConfigGain[index]
state.weighted_strength = Vectors.ConfigWeighted[index]
state.ping_pong_strength = Vectors.ConfigPingPong[index]
state.frequency = Vectors.ConfigFrequency[index]
return state
}
Main :: () -> s32 {
defaults := FastNoise.NoiseCreate()
if defaults.seed != 1337 || defaults.octaves != 3 || defaults.noise_type != FastNoise.NoiseType.OpenSimplex2 || defaults.fractal_type != FastNoise.FractalType.None {
print("FAIL NoiseCreate defaults\n"); return 1
}
failures: s32 = 0; exact: s32 = 0; total: s32 = 0; worst: float64 = 0
config: s32 = 0
while config < Vectors.CONFIG_COUNT {
state := Configure(config)
point: s32 = 0
while point < Vectors.POINT_COUNT {
x := Vectors.PointX[point]; y := Vectors.PointY[point]; z := Vectors.PointZ[point]
dimension: s32 = 2
while dimension <= 3 {
got: float64 = 0; want: float64 = 0
if dimension == 2 { got = cast(float64) FastNoise.Noise2D(*state, x, y); want = Vectors.Expected2D[config * Vectors.POINT_COUNT + point] }
else { got = cast(float64) FastNoise.Noise3D(*state, x, y, z); want = Vectors.Expected3D[config * Vectors.POINT_COUNT + point] }
diff := got - want; if diff < 0 { diff = -diff }
if diff > worst { worst = diff }
if got == want { exact += 1 }
if diff > TOLERANCE {
failures += 1
if failures <= 10 { print("FAIL config % point % %D: got % want %\n", config, point, dimension, got, want) }
}
total += 1; dimension += 1
}
point += 1
}
config += 1
}
print("FastNoiseLite vectors: % of % exact, max difference %\n", exact, total, worst)
if failures > 0 { print("FAIL % values differ by more than 1e-6\n", failures); return 1 }
print("FastNoiseLite comparison passed\n")
return 0
}
+416
View File
@@ -0,0 +1,416 @@
// Generated once from FastNoiseLite C (MIT, Jordan Peck), float32, by a
// throwaway capture program; expected values are exact float32 results
// widened to float64 (%.17g).
CONFIG_COUNT :: 22;
POINT_COUNT :: 48;
PointX: [48]float32 = .{
0, 1, -1.5, 4096, -0.125, 12.5,
26926.6367, 6647.15625, 28263.4141, 6065.60938, 4595.90234, 86.9414062,
12631.9453, -9329.41797, -31538.7266, 7109.66797, -2392.60938, 16912.3984,
13120.4297, -15415.5547, -8728.94922, 960.289062, -634.707031, -3036.36719,
22520.4688, -28835.2578, 9554.02734, -27241.1602, -11142.5586, 12725.4844,
6375.0625, 9176.92969, 13680.0156, 8391.50781, 603.066406, 3284.00781,
-27337.5078, -6630.95703, 18214.9609, 25889.4336, 10919.4141, -7082.42188,
25585.9219, -12858.1797, 22409.5781, -3030.16016, -12130.6328, -22738.9766
};
PointY: [48]float32 = .{
0, 2, -2.25, -4096, 0.0625, 64,
8941.21875, 2132.04297, 26675.5, 30758.168, -6520.57031, 31022.6328,
28919.9453, -10737, -19799.4258, 7978.96875, 18979.7891, 10586.2617,
22946.3906, 12595.4805, -8608.11719, 23272, -28076.1406, -20247.1641,
29416.3438, 3020.51562, -27514.7852, 1069.95703, 32264.5312, 17276.3516,
12419.9414, -13579.9805, 3799.04688, 10296.3047, 24062.7773, -25273.5586,
-7630.24219, 3513.42188, 32289.7031, -25193.1055, -32518.2305, 26141.0039,
-13070.0469, 2889.30078, 911.441406, 24848.5938, -16917.9883, 16767.8359
};
PointZ: [48]float32 = .{
0, 3, 7.75, 0.5, -1000, -12.5,
605.144531, 19970.6055, -26178.5391, -15268.3477, -21634.9531, -12693.4805,
30999.168, 6416.49609, -7157.39844, 14946.6953, 840.515625, -8205.5625,
18196.3516, 20186.6172, -6515.32031, 23850.0898, -28074.9062, -3708.97656,
22041.0781, 16647.3047, 16095.875, -15126.1055, 22121.3828, 2109.19922,
-9204.00391, 19414.4648, -5684.48438, 24926.1328, -1887, 22501.2188,
-30420.3516, 29591.707, -22973.3164, -16540.1055, -27359.793, 8878.78906,
-7394.90625, -27026.5273, -21706.1406, -21444.5156, 30160.5312, 26438.1875
};
ConfigType: [22]s32 = .{1,1,1,1,1,1,1,1,1,1,0,0,2,2,4,4,3,3,1,0,1,0};
ConfigFractal: [22]s32 = .{1,1,2,1,1,1,1,2,2,0,0,1,0,2,0,1,0,3,3,2,1,1};
ConfigOctaves: [22]s32 = .{1,3,1,2,2,2,2,3,2,3,3,3,3,3,3,4,3,3,3,2,3,2};
ConfigSeed: [22]s32 = .{
1337, 1337, 1337, 1438, 1539, 1337,
-424242, 987654321, 7, 1337, 1337, 42,
1337, 9001, 1337, 1337, 1337, 1337,
1337, -1, 1337, 2147483647
};
ConfigRotation: [22]s32 = .{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1};
ConfigLacunarity: [22]float32 = .{1,1,2,2,2,2,1,2,1,2,2,2,2,2,2,2,2,2,2,2,2,2};
ConfigGain: [22]float32 = .{
0.75, 0.75, 1, 0.5, 0.5, 1,
0.75, 0.75, 1, 0.5, 0.5, 0.5,
0.5, 0.5, 0.5, 0.5, 0.5, 0.5,
0.5, 0.5, 0.5, 0.5
};
ConfigWeighted: [22]float32 = .{0,0,0,0,0,0,0,0,0,0,0,0.5,0,0,0,0.300000012,0,0,0,0,0,0};
ConfigPingPong: [22]float32 = .{2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1.5,2,2,2};
ConfigFrequency: [22]float32 = .{
0.00999999978, 0.00999999978, 0.00999999978, 0.00999999978, 0.00999999978, 0.00999999978,
0.00999999978, 0.00999999978, 0.00999999978, 0.00999999978, 0.00999999978, 0.00999999978,
0.00999999978, 0.00999999978, 0.00999999978, 0.00999999978, 0.00999999978, 0.00999999978,
0.0199999996, 0.00499999989, 0.00999999978, 0.00999999978
};
Expected2D: [1056]float64 = .{
-5.0105535100975187e-29, 0.078882031142711639, -0.096827492117881775, -0.07555360347032547, -0.00095532281557098031, -0.078990668058395386,
0.28557085990905762, 0.21369500458240509, -0.41367504000663757, -0.39450734853744507, 0.57152992486953735, -0.0073272893205285072,
-0.3107837438583374, 0.51202690601348877, -0.23094528913497925, -0.73056519031524658, 0.096588663756847382, -0.25686296820640564,
0.68071043491363525, -0.23173703253269196, -0.29703843593597412, 0.58657485246658325, -0.75011855363845825, 0.41173574328422546,
-0.10180319845676422, -0.59581327438354492, 0.60133767127990723, 0.22312344610691071, 0.00065519503550603986, -0.060980726033449173,
0.46806538105010986, -0.86900043487548828, -0.22696281969547272, -0.4786389172077179, 0.52047407627105713, -0.1398126631975174,
0.090858161449432373, -0.45541980862617493, -0.20506063103675842, -0.47650760412216187, 0.49985668063163757, -0.44929149746894836,
0.072893805801868439, -0.38704445958137512, -0.088674940168857574, -0.40264609456062317, 0.12748908996582031, -0.38649639487266541,
-9.4730752285761427e-29, 0.06473715603351593, -0.083557054400444031, -0.065959826111793518, -0.0024979859590530396, -0.13853172957897186,
0.1170603409409523, -0.21928560733795166, -0.079639077186584473, 0.07854875922203064, 0.42748495936393738, 0.047179386019706726,
-0.53875631093978882, -0.066610425710678101, -0.23187534511089325, -0.28232094645500183, 0.009463869035243988, -0.34167379140853882,
0.033362902700901031, -0.084363929927349091, -0.46292635798454285, 0.5939827561378479, -0.537345290184021, 0.16841858625411987,
0.12116680294275284, -0.17885957658290863, 0.36707371473312378, 0.052269443869590759, 0.022138159722089767, 0.10780995339155197,
0.42475289106369019, -0.52429407835006714, -0.21178901195526123, -0.36458396911621094, 0.33569177985191345, 0.054660409688949585,
-0.073095604777336121, -0.22825548052787781, -0.27994152903556824, -0.082625828683376312, 0.11248986423015594, -0.21987785398960114,
0.28939542174339294, -0.020472913980484009, 0.24885480105876923, 0.26907286047935486, 0.30528447031974792, -0.26484069228172302,
1, 0.84223592281341553, 0.80634498596191406, 0.84889280796051025, 0.99808937311172485, 0.84201866388320923,
0.42885828018188477, 0.57261002063751221, 0.17264991998672485, 0.21098530292510986, -0.14305984973907471, 0.98534542322158813,
0.3784325122833252, -0.024053812026977539, 0.5381094217300415, -0.46113038063049316, 0.80682265758514404, 0.48627406358718872,
-0.36142086982727051, 0.53652596473693848, 0.40592312812805176, -0.1731497049331665, -0.5002371072769165, 0.17652851343154907,
0.79639363288879395, -0.19162654876708984, -0.20267534255981445, 0.55375313758850098, 0.99868959188461304, 0.87803852558135986,
0.063869237899780273, -0.73800086975097656, 0.54607439041137695, 0.042722165584564209, -0.040948152542114258, 0.7203747034072876,
0.81828367710113525, 0.089160382747650146, 0.58987873792648315, 0.04698479175567627, 0.00028663873672485352, 0.10141700506210327,
0.85421240329742432, 0.22591108083724976, 0.82265013456344604, 0.19470781087875366, 0.74502182006835938, 0.22700721025466919,
-5.8359252322392515e-29, 0.062762141227722168, -0.068986386060714722, -0.059712179005146027, 0.0026592402718961239, 0.020121544599533081,
0.171884685754776, 0.0065499991178512573, -0.28728857636451721, 0.4193732738494873, 0.24173718690872192, -0.4414830207824707,
0.17671337723731995, 0.3247339129447937, 0.23846682906150818, 0.29108217358589172, 0.17081406712532043, 0.42235895991325378,
-0.26814109086990356, -0.53883075714111328, 0.6199917197227478, -0.33950582146644592, 0.30235481262207031, 0.34609979391098022,
-0.3971402645111084, -0.13415910303592682, 0.51445966958999634, 0.017278105020523071, 0.023482784628868103, -0.48147016763687134,
-0.41107571125030518, -0.50045853853225708, 0.15739409625530243, 0.15100948512554169, -0.42017179727554321, -0.067314445972442627,
0.31357967853546143, 0.083256378769874573, 0.46767190098762512, -0.25376859307289124, 0.34802943468093872, 0.076720520853996277,
-0.47087907791137695, -0.640735924243927, -0.44435471296310425, -0.47976234555244446, 0.11328888684511185, -0.25489115715026855,
-2.3931876322854222e-29, -0.067718468606472015, 0.085911571979522705, -0.25206485390663147, 0.002076529897749424, 0.13190934062004089,
0.65085446834564209, -0.14889611303806305, 0.23811176419258118, -0.21972747147083282, 0.069302380084991455, 0.39588749408721924,
-0.43370524048805237, -0.10635006427764893, -0.2572706937789917, 0.17843437194824219, -0.41523438692092896, 0.042340338230133057,
0.22839453816413879, 0.066685944795608521, -0.32977116107940674, -0.12247133255004883, 0.35399198532104492, -0.45820370316505432,
0.1643998771905899, -0.077116519212722778, -0.64373743534088135, -0.21879832446575165, -0.070760011672973633, 0.13793499767780304,
0.66001725196838379, -0.34237530827522278, -0.14953857660293579, -0.40547698736190796, -0.56375241279602051, 0.14653569459915161,
0.38654768466949463, -0.074631497263908386, -0.25527742505073547, -0.0044055413454771042, -0.15755470097064972, -0.45130497217178345,
-0.211016446352005, -0.19266924262046814, 0.3874937891960144, -0.28258854150772095, -0.096775524318218231, -0.04793471097946167,
-8.0225081278874254e-29, 0.099549882113933563, -0.12794630229473114, -0.22555303573608398, -0.0037769847549498081, 0.024719774723052979,
0.43683663010597229, -0.090289212763309479, -0.042601734399795532, -0.1156417578458786, 0.25089374184608459, 0.32192009687423706,
-0.38471484184265137, 0.20273676514625549, -0.34318077564239502, -0.32857915759086609, -0.13741655647754669, 0.01636900007724762,
0.15669445693492889, -0.022691912949085236, 0.11486387252807617, 0.24275250732898712, -0.11164224147796631, 0.28226527571678162,
0.17539173364639282, -0.22859376668930054, -0.13442867994308472, 0.42086368799209595, 0.10624221712350845, 0.11288953572511673,
0.23798219859600067, -0.69809532165527344, -0.24780064821243286, 0.13967762887477875, 0.57337749004364014, -0.047923743724822998,
-0.145102858543396, -0.52526414394378662, -0.41583806276321411, -0.077816545963287354, 0.30306285619735718, -0.4346444308757782,
0.30072212219238281, -0.22613523900508881, -0.14990109205245972, -0.17856806516647339, -0.020089469850063324, -0.40405866503715515,
-1.8125521337498606e-28, -0.049750566482543945, 0.059498965740203857, -0.12382933497428894, -5.541299469769001e-05, -0.31263279914855957,
-0.27152121067047119, -0.054876193404197693, 0.34706199169158936, -0.1347927451133728, 0.01062503457069397, -0.17213447391986847,
0.14110942184925079, -0.2893521785736084, 0.14036037027835846, -0.28958520293235779, 0.11580553650856018, -0.074463412165641785,
0.16476944088935852, -0.032064668834209442, 0.36593776941299438, -0.16307725012302399, 0.041387185454368591, 0.15418224036693573,
-0.059173323214054108, -0.11309146881103516, -0.36850261688232422, 0.09709484875202179, 0.038103848695755005, -0.27030616998672485,
0.40683963894844055, -0.31451943516731262, 0.012184634804725647, 0.26455822587013245, 0.28509047627449036, 0.17510363459587097,
0.23200833797454834, -0.081395164132118225, -0.049985848367214203, 0.32333198189735413, 0.46927344799041748, -0.04291311651468277,
-0.10237032175064087, 0.20749244093894958, 0.060202058404684067, 0.23178970813751221, -0.49739155173301697, -0.43132153153419495,
1, 0.69954037666320801, 0.63495254516601562, 0.41057875752449036, 0.99305319786071777, 0.47659793496131897,
0.31818583607673645, -0.11972032487392426, 0.03269563615322113, -0.054253324866294861, 0.13457776606082916, 0.48330682516098022,
0.63585174083709717, 0.2345631867647171, 0.46505221724510193, 0.18784928321838379, 0.20607547461986542, 0.31432446837425232,
0.12230023741722107, 0.42852187156677246, 0.023145034909248352, 0.21566280722618103, -0.16857750713825226, -0.048740819096565247,
0.22530536353588104, 0.43086570501327515, 0.37890249490737915, 0.10604343563318253, 0.35899984836578369, 0.50347959995269775,
0.17762108147144318, 0.47694230079650879, 0.4497065544128418, 0.44766336679458618, 0.4375728964805603, -0.62214517593383789,
0.34547328948974609, 0.025320801883935928, 0.30055117607116699, 0.36525475978851318, 0.78238606452941895, 0.27273455262184143,
-0.070438176393508911, 0.13863414525985718, 0.6683650016784668, 0.38317334651947021, 0.22519245743751526, 0.40432077646255493,
1, 0.98862850666046143, 0.96237921714782715, 0.77556777000427246, 0.98995357751846313, 0.029789388179779053,
0.45641973614692688, 0.50189721584320068, 0.67319607734680176, 0.17207643389701843, 0.10231262445449829, 0.22276020050048828,
0.30781510472297668, 0.60834956169128418, 0.55106502771377563, -0.11962273716926575, 0.0024095475673675537, 0.55492651462554932,
0.73790442943572998, 0.36530143022537231, -0.43823802471160889, -0.29281553626060486, 0.2213703989982605, 0.77962720394134521,
0.31604859232902527, -0.39615529775619507, 0.071626722812652588, 0.11080130934715271, 0.71752834320068359, -0.070473968982696533,
-0.44342827796936035, 0.26118928194046021, 0.22261494398117065, -0.30186927318572998, 0.12008780241012573, -0.55611264705657959,
-0.2080954909324646, 0.35517352819442749, 0.83575201034545898, -0.09849393367767334, 0.071062952280044556, 0.55908548831939697,
0.85966402292251587, -0.21429270505905151, 0.25062823295593262, 0.08225482702255249, 0.19526833295822144, 0.45340847969055176,
-5.0105535100975187e-29, 0.078882031142711639, -0.096827492117881775, -0.07555360347032547, -0.00095532281557098031, -0.078990668058395386,
0.28557085990905762, 0.21369500458240509, -0.41367504000663757, -0.39450734853744507, 0.57152992486953735, -0.0073272893205285072,
-0.3107837438583374, 0.51202690601348877, -0.23094528913497925, -0.73056519031524658, 0.096588663756847382, -0.25686296820640564,
0.68071043491363525, -0.23173703253269196, -0.29703843593597412, 0.58657485246658325, -0.75011855363845825, 0.41173574328422546,
-0.10180319845676422, -0.59581327438354492, 0.60133767127990723, 0.22312344610691071, 0.00065519503550603986, -0.060980726033449173,
0.46806538105010986, -0.86900043487548828, -0.22696281969547272, -0.4786389172077179, 0.52047407627105713, -0.1398126631975174,
0.090858161449432373, -0.45541980862617493, -0.20506063103675842, -0.47650760412216187, 0.49985668063163757, -0.44929149746894836,
0.072893805801868439, -0.38704445958137512, -0.088674940168857574, -0.40264609456062317, 0.12748908996582031, -0.38649639487266541,
0, 0.13644574582576752, -0.16737951338291168, -0.13165616989135742, -0.0016542950179427862, -0.25142642855644226,
0.3329213559627533, 0.13926798105239868, -0.66357278823852539, -0.60033237934112549, 0.84187722206115723, -0.10088186711072922,
-0.59912055730819702, 0.86659961938858032, -0.45400679111480713, -0.91934758424758911, 0.22369478642940521, -0.41002532839775085,
0.7973177433013916, -0.42674934864044189, -0.45944082736968994, 0.705829918384552, -0.84482395648956299, 0.74481189250946045,
-0.027812352403998375, -0.76454782485961914, 0.89563918113708496, 0.32588610053062439, 0.0047411881387233734, -0.086219653487205505,
0.52818578481674194, -0.97248369455337524, -0.41463577747344971, -0.64982736110687256, 0.59061574935913086, 0.00055309338495135307,
0.090224258601665497, -0.51604795455932617, -0.31758463382720947, -0.50016200542449951, 0.63761937618255615, -0.77000230550765991,
0.0061812354251742363, -0.40650054812431335, -0.19130025804042816, -0.49642375111579895, 0.085455827414989471, -0.68365585803985596,
0, 0.14252910017967224, -0.15225332975387573, -0.13405010104179382, 0.002451000502333045, 0.013679273426532745,
-0.097846284508705139, -0.3714374303817749, 0.10932132601737976, -0.038881253451108932, 0.65845274925231934, 0.35365155339241028,
0.1959112286567688, -0.39479091763496399, -0.24831363558769226, 0.28994035720825195, 0.46957117319107056, -0.41973769664764404,
-0.3857472836971283, 0.63147842884063721, 0.16445249319076538, -0.11828287690877914, -0.22904784977436066, -0.31402653455734253,
0.18035662174224854, 0.44538247585296631, -0.34789997339248657, 0.29581606388092041, 0.12241570651531219, -0.54820072650909424,
-0.2347303181886673, 0.088177450001239777, -0.076816938817501068, 0.099104806780815125, -0.0707593634724617, -0.14073584973812103,
-0.40413206815719604, 0.045205675065517426, -0.20370838046073914, 0.25702321529388428, -0.53449100255966187, -0.34228524565696716,
0.14022238552570343, 0.38324630260467529, -0.41524428129196167, -0.22889436781406403, 0.14726082980632782, 0.08799019455909729,
0, 0.031180113554000854, -0.038264457136392593, -0.029247388243675232, -0.00037850392982363701, -0.16057154536247253,
0.06692998856306076, 0.044024966657161713, -0.50432932376861572, 0.31167036294937134, 0.024178557097911835, -0.24367853999137878,
-0.017797194421291351, -0.26431602239608765, 0.12893678247928619, 0.16460895538330078, -0.19320212304592133, -0.20130327343940735,
0.033111762255430222, 0.24280694127082825, 0.37494602799415588, 0.47418895363807678, 0.13024155795574188, 0.03136352077126503,
0.068275205790996552, -0.49822726845741272, -0.26577100157737732, -0.65312796831130981, -0.16558916866779327, 0.15440495312213898,
0.34770375490188599, -0.27786782383918762, 0.20242616534233093, -0.085860833525657654, 0.43113255500793457, 0.35319623351097107,
-0.079069636762142181, -0.29576492309570312, -0.22899007797241211, 0.043203830718994141, -0.32429090142250061, -0.03990546241402626,
-0.39603883028030396, 0.12525832653045654, 0.0892353355884552, -0.29803618788719177, -0.24968568980693817, -0.047776326537132263,
1.0000001192092896, 0.9377739429473877, 0.92944210767745972, 0.74436724185943604, 0.99505984783172607, 0.37960526347160339,
0.60575968027114868, 0.027029335498809814, 0.13433462381362915, 0.43540763854980469, 0.71726632118225098, 0.16300392150878906,
0.2085355818271637, 0.039540596306324005, 0.33286377787590027, 0.4722619354724884, 0.42942619323730469, 0.50880759954452515,
0.15033602714538574, 0.68680721521377563, 0.688179612159729, 0.38109955191612244, 0.64631384611129761, -0.13109642267227173,
0.49402034282684326, 0.34641602635383606, 0.63267970085144043, 0.51336634159088135, 0.54751628637313843, 0.3928406834602356,
0.016288034617900848, 0.39299964904785156, 0.71150302886962891, 0.71229398250579834, 0.63365525007247925, 0.19842301309108734,
-0.077357783913612366, 0.31173679232597351, 0.59375154972076416, 0.556965172290802, 0.48422533273696899, 0.43852841854095459,
0.56995087862014771, 0.63183420896530151, 0.60992628335952759, 0.64070355892181396, 0.24158163368701935, 0.51155638694763184,
0.42036199569702148, 0.41921547055244446, 0.42040428519248962, 0.16408255696296692, 0.42035770416259766, -0.063070118427276611,
0.59679841995239258, -0.018283654004335403, 0.50855493545532227, 0.45866143703460693, -0.78159010410308838, -0.54014188051223755,
0.092707417905330658, 0.61905086040496826, -0.49036401510238647, 0.42620536684989929, -0.60078001022338867, -0.22670073807239532,
0.048682302236557007, -0.77872645854949951, -0.93519461154937744, 0.54987543821334839, -0.46490007638931274, 0.025686800479888916,
0.11887909471988678, -0.096194237470626831, -0.051042720675468445, 0.4719516932964325, -0.091485306620597839, 0.26390111446380615,
0.12053033709526062, -0.31699779629707336, -0.033561229705810547, -0.78519535064697266, -0.094477325677871704, 0.39423230290412903,
0.035849198698997498, 0.46573790907859802, -0.42428562045097351, 0.33913227915763855, -0.50623738765716553, -0.78004342317581177,
0.66989940404891968, -0.37356972694396973, 0.31281164288520813, -0.037967458367347717, 0.047178506851196289, -0.32142743468284607,
0.21695902943611145, 0.21887809038162231, 0.21632540225982666, -0.012142624706029892, 0.21694888174533844, 0.043223906308412552,
0.14075390994548798, -0.03380976989865303, 0.21422487497329712, 0.30893883109092712, -0.43558824062347412, -0.26288732886314392,
-0.03470301628112793, 0.32358399033546448, -0.42442843317985535, 0.26752850413322449, -0.45573335886001587, -0.13593150675296783,
0.18097072839736938, -0.44531092047691345, -0.6105768084526062, 0.31282162666320801, -0.15892907977104187, 0.17439177632331848,
0.21178771555423737, -0.035384267568588257, 0.12654313445091248, 0.22001045942306519, -0.19003857672214508, 0.11288122087717056,
0.077765412628650665, -0.26694998145103455, 0.019071787595748901, -0.60716503858566284, 0.13025987148284912, 0.2417561411857605,
-0.048104114830493927, 0.32599681615829468, -0.2803787887096405, 0.057087209075689316, -0.19264012575149536, -0.36446118354797363,
0.32370516657829285, -0.19435667991638184, 0.17048688232898712, -0.089556023478507996, 0.11103794723749161, -0.35796794295310974,
0.18682755529880524, 0.17595510184764862, 0.19893741607666016, 0.084757417440414429, 0.18671195209026337, -0.056616518646478653,
0.42555233836174011, -0.0083600301295518875, 0.31368747353553772, 0.42116069793701172, -0.35422909259796143, -0.24838601052761078,
0.076875954866409302, 0.4150521457195282, -0.23445826768875122, 0.25872653722763062, -0.31263294816017151, -0.025409698486328125,
0.10830303281545639, -0.31560242176055908, -0.55542117357254028, 0.33940443396568298, -0.22330451011657715, 0.065164171159267426,
0.19159030914306641, 0.034000672399997711, -0.041195828467607498, 0.16230298578739166, -0.084456242620944977, 0.060351423919200897,
-0.069576002657413483, -0.15066702663898468, 0.034008793532848358, -0.34164512157440186, -0.026133278384804726, 0.18178039789199829,
-0.024647712707519531, 0.28414866328239441, -0.12395347654819489, 0.156682088971138, -0.16677460074424744, -0.4764094352722168,
0.33990070223808289, -0.23142150044441223, 0.16317757964134216, -0.032355085015296936, -0.0019099712371826172, -0.21469993889331818,
-0.35501489043235779, -0.3586251437664032, -0.35865166783332825, -0.26768127083778381, -0.35393601655960083, -0.72555702924728394,
0.44628638029098511, -0.80482512712478638, -0.043075568974018097, 0.39579823613166809, 0.0023906584829092026, -0.39322185516357422,
-0.48474320769309998, 0.022879123687744141, -0.045187376439571381, -0.36327970027923584, 0.093317896127700806, -0.74476206302642822,
-0.24735820293426514, -0.051436826586723328, 0.40972596406936646, 0.0565839484333992, -0.12304846197366714, -0.20871903002262115,
-0.083945900201797485, -0.83178019523620605, -0.47071871161460876, -0.48612141609191895, -0.37047109007835388, -0.65854454040527344,
-0.58126592636108398, -0.21362577378749847, -0.79574841260910034, 0.31495586037635803, -0.53794193267822266, -0.37467336654663086,
-0.40130594372749329, -0.24330815672874451, -0.39785158634185791, -0.33904451131820679, -0.39847105741500854, 0.3811546266078949,
-0.050421178340911865, -0.34311133623123169, -0.195355623960495, -0.49011987447738647, -0.63277870416641235, 0.064123168587684631,
0, -0.59557610750198364, 0.69473081827163696, 0.61384004354476929, 0.028878144919872284, -0.66448920965194702,
0.39664182066917419, -0.15874180197715759, -0.11864465475082397, -0.22757695615291595, -0.65413796901702881, -0.46883654594421387,
-0.050355926156044006, -0.69044578075408936, 0.37791275978088379, -0.18931570649147034, -0.66669213771820068, -0.21744731068611145,
0.62457799911499023, 0.068801596760749817, 0.78215837478637695, -0.46956050395965576, -0.19921684265136719, -0.36241269111633301,
0.69527566432952881, 0.6130860447883606, 0.26048257946968079, 0.45924898982048035, -0.30253925919532776, 0.31788808107376099,
-0.50674128532409668, 0.13540047407150269, 0.13878369331359863, 0.035700462758541107, 0.29944902658462524, -0.48669725656509399,
-0.14676421880722046, 0.25456917285919189, -0.059864796698093414, -0.17313399910926819, -0.19651283323764801, -0.030346773564815521,
0.34334421157836914, 0.19026972353458405, -0.54071182012557983, -0.56002277135848999, 0.38917773962020874, 0.27697855234146118,
1, 0.88208281993865967, 0.85007268190383911, 0.78793293237686157, 0.99260634183883667, 0.58613032102584839,
-0.19266341626644135, -0.51488983631134033, -0.31762158870697021, 0.44528281688690186, 0.51192110776901245, -0.034597873687744141,
0.041825775057077408, -0.59285849332809448, -0.49712198972702026, -0.17200970649719238, -0.0074655413627624512, 0.66345900297164917,
0.52757549285888672, -0.36053237318992615, 0.33077436685562134, -0.47098356485366821, -0.47159853577613831, -0.13966929912567139,
0.14662700891494751, 0.090135298669338226, -0.029066763818264008, -0.57149684429168701, 0.35800248384475708, 0.43386369943618774,
-0.0794869065284729, -0.085774540901184082, -0.20618045330047607, 0.11164867877960205, -0.73041808605194092, -0.088885962963104248,
0.41480258107185364, 0.12619891762733459, -0.28116524219512939, 0.93837565183639526, 0.15811462700366974, 0.5029558539390564,
-0.63726937770843506, 0.46027868986129761, -0.3956882655620575, -0.20875489711761475, -0.35648339986801147, -0.04397273063659668,
-8.2051049440616716e-29, 0.10402695834636688, -0.13528677821159363, -0.076986342668533325, -0.0048146136105060577, 0.0015545180067420006,
0.27877894043922424, -0.076546624302864075, -0.075643159449100494, -0.12121105194091797, 0.27845734357833862, 0.17378401756286621,
-0.25559133291244507, 0.18479986488819122, -0.28450745344161987, -0.33343619108200073, 0.002084098756313324, -0.06204826757311821,
0.2556319534778595, -0.077347941696643829, -0.0076714074239134789, 0.37208160758018494, -0.35143572092056274, 0.14909999072551727,
0.08444637805223465, -0.23466777801513672, -0.013550519943237305, 0.37255066633224487, 0.019690681248903275, 0.11692842841148376,
0.21609897911548615, -0.71688598394393921, -0.23016862571239471, -0.081800550222396851, 0.50350862741470337, -0.076738119125366211,
0.014271978288888931, -0.46116593480110168, -0.31034573912620544, -0.16507092118263245, 0.35098081827163696, -0.27979108691215515,
0.20549941062927246, -0.16910256445407867, -0.058015145361423492, -0.18251866102218628, 0.0189402736723423, -0.385385662317276,
0, 0.056255072355270386, -0.049241591244935989, -0.25606852769851685, 0.0073936115950345993, 0.37923747301101685,
0.25664275884628296, -0.26776820421218872, -0.58871752023696899, 0.75205397605895996, 0.39151817560195923, -0.23895391821861267,
0.67845624685287476, -0.33215147256851196, -0.22870545089244843, 0.84934186935424805, 0.24769411981105804, 0.56951069831848145,
0.097694799304008484, -0.45671501755714417, -0.0054337978363037109, -0.15349775552749634, -0.30751723051071167, -0.17583724856376648,
0.036573708057403564, 0.02629346027970314, -0.024913191795349121, -0.28873860836029053, -0.27669158577919006, 0.36708667874336243,
-0.088702447712421417, 0.47572058439254761, 0.014561265707015991, -0.24329602718353271, 0.1642187237739563, -0.46245583891868591,
0.16251519322395325, 0.37027692794799805, -0.54615318775177002, -0.45688962936401367, -0.49998036026954651, 0.23911112546920776,
0.51448321342468262, -0.052230715751647949, 0.45007950067520142, -0.22336015105247498, -0.82263171672821045, 0.48757559061050415
};
Expected3D: [1056]float64 = .{
0, -0.028409272432327271, -0.27611419558525085, 0.018428057432174683, -0.77827209234237671, 0.69043469429016113,
-0.64134418964385986, 0.023354409262537956, 0.049502827227115631, -0.34114056825637817, 0.13366381824016571, -0.4283776581287384,
-0.40745392441749573, -0.58860856294631958, -0.34831827878952026, -0.77368348836898804, -0.31088390946388245, -0.38999047875404358,
0.15395411849021912, 0.55506032705307007, 0.13811488449573517, 0.0072835353203117847, -0.60466790199279785, 0.33877205848693848,
0.50108051300048828, -0.50709176063537598, 0.44194495677947998, -0.29328224062919617, 0.61487019062042236, 0.46668422222137451,
-0.3804527223110199, -0.26545518636703491, 0.58890485763549805, 0.61111152172088623, 0.10440374165773392, -0.47901454567909241,
0.14588043093681335, -0.35672160983085632, -0.070560947060585022, 0.77705866098403931, -0.062809579074382782, -0.44701153039932251,
-0.48655569553375244, -0.030191509053111076, -0.011628937907516956, -0.45050784945487976, 0.47635746002197266, -0.5317990779876709,
0, 0.0038601541891694069, 0.036606170237064362, 0.020322525873780251, -0.48171418905258179, 0.11833365261554718,
-0.33259400725364685, 0.15589579939842224, 0.15070334076881409, -0.0094040334224700928, 0.097276106476783752, -0.11716485023498535,
-0.20605826377868652, -0.12074212729930878, -0.14355161786079407, -0.21715600788593292, -0.17635482549667358, -0.16968667507171631,
0.072634562849998474, 0.20066238939762115, -0.056364759802818298, -0.028110727667808533, -0.29607999324798584, 0.049443148076534271,
0.075510047376155853, -0.50327301025390625, 0.33418527245521545, 0.03000369668006897, 0.016794376075267792, 0.13589081168174744,
-0.4104154109954834, 0.031887784600257874, 0.017285540699958801, 0.32303392887115479, 0.21818399429321289, -0.0088059082627296448,
0.10554485023021698, 0.032167326658964157, -0.34230715036392212, 0.47632551193237305, -0.18369247019290924, -0.2250264585018158,
-0.42814615368843079, 0.032913465052843094, -0.11285309493541718, -0.18403062224388123, 0.13300971686840057, -0.30959519743919373,
1, 0.94318145513534546, 0.44777160882949829, 0.96314388513565063, -0.55654418468475342, -0.38086938858032227,
-0.28268837928771973, 0.95329117774963379, 0.90099436044692993, 0.31771886348724365, 0.73267233371734619, 0.14324468374252319,
0.18509215116500854, -0.17721712589263916, 0.30336344242095947, -0.54736697673797607, 0.37823218107223511, 0.22001904249191284,
0.69209176301956177, -0.11012065410614014, 0.72377026081085205, 0.98543292284011841, -0.2093358039855957, 0.32245588302612305,
-0.0021610260009765625, -0.014183521270751953, 0.11611008644104004, 0.41343551874160767, -0.22974038124084473, 0.066631555557250977,
0.23909455537796021, 0.46908962726593018, -0.17780971527099609, -0.22222304344177246, 0.79119253158569336, 0.041970908641815186,
0.70823913812637329, 0.28655678033828735, 0.85887813568115234, -0.55411732196807861, 0.87438082695007324, 0.10597693920135498,
0.026888608932495117, 0.93961697816848755, 0.97674214839935303, 0.098984301090240479, 0.047285079956054688, -0.063598155975341797,
0, -0.00041676126420497894, -0.20519186556339264, 0.084165908396244049, -0.25993233919143677, -0.065180376172065735,
-0.35843312740325928, 0.33578017354011536, -0.44451484084129333, 0.23157444596290588, 0.17678606510162354, 0.38643491268157959,
-0.32106518745422363, 0.0037834197282791138, 0.58522480726242065, 0.13739472627639771, -0.10505950450897217, -0.342041015625,
0.14129611849784851, 0.022514050826430321, -0.2892346978187561, -0.07344837486743927, 0.2034648060798645, -0.16323430836200714,
0.13945956528186798, -0.2743765115737915, 0.19384865462779999, -0.062051855027675629, 0.043745912611484528, 0.35701048374176025,
-0.09628402441740036, -0.15198421478271484, -0.20993542671203613, -0.30287876725196838, 0.058467507362365723, -0.20759601891040802,
0.19537873566150665, 0.56465893983840942, 0.41551202535629272, 0.12407608330249786, 0.2734997570514679, 0.10953494906425476,
0.038272086530923843, 0.23947069048881531, 0.24269023537635803, -0.045850016176700592, 0.3548511266708374, 0.72260230779647827,
0, 0.018017664551734924, 0.16608665883541107, 0.14731907844543457, 0.59464728832244873, 0.18976911902427673,
0.2266792356967926, -0.11169032752513885, -0.37567585706710815, -0.10804027318954468, 0.28638619184494019, 0.040444850921630859,
-0.07287895679473877, 0.020415855571627617, -0.25071725249290466, -0.25828319787979126, -0.012346405535936356, -0.22166168689727783,
0.089750684797763824, 0.38012641668319702, 0.1611764132976532, -0.041431248188018799, 0.2765040397644043, -0.24010422825813293,
-0.59758198261260986, -0.26349091529846191, 0.02141977846622467, -0.0011277422308921814, 0.30024927854537964, -0.14613926410675049,
0.28692987561225891, -0.31388366222381592, -0.24771814048290253, 0.20961537957191467, -0.72996717691421509, -0.26404938101768494,
-0.12525007128715515, -0.29055723547935486, 0.55738526582717896, 0.25117844343185425, -0.37069022655487061, 0.30909925699234009,
-0.20187839865684509, -0.045564800500869751, 0.14822721481323242, -0.24553214013576508, 0.46275216341018677, 0.14202706515789032,
0, 0.013612167909741402, 0.10883240401744843, 0.12049315869808197, -0.093834191560745239, 0.6440117359161377,
-0.44305163621902466, 0.19245666265487671, -0.152300164103508, -0.37727305293083191, -0.076668061316013336, 0.0061165392398834229,
-0.14890700578689575, -0.14668016135692596, -0.35884660482406616, -0.27047255635261536, 0.053887307643890381, -0.11490983515977859,
-0.054462939500808716, 0.65420663356781006, 0.045877240598201752, 0.15435749292373657, -0.096509993076324463, 0.17935910820960999,
0.4303932785987854, 0.009465336799621582, 0.18296501040458679, -0.45895552635192871, 0.2637384831905365, 0.2555568516254425,
0.0067283660173416138, -0.2287648618221283, 0.42619356513023376, 0.032372564077377319, 0.044453799724578857, -0.10522046685218811,
0.23399125039577484, -0.1105741485953331, -0.1815427839756012, 0.41689595580101013, 0.11643339693546295, -0.18536804616451263,
0.013818740844726562, 0.27750790119171143, -0.37158447504043579, 0.090585306286811829, 0.059092089533805847, -0.22858248651027679,
0, 0.12976783514022827, 0.13246347010135651, 0.069493889808654785, 0.56953084468841553, 0.19243675470352173,
0.15654736757278442, 0.22212663292884827, -0.010522536933422089, -0.23183357715606689, 0.19066271185874939, -0.23620691895484924,
0.1252627819776535, 0.36236932873725891, -0.44043010473251343, -0.46959546208381653, -0.018038894981145859, 0.33695119619369507,
0.25640270113945007, 0.17061939835548401, -0.24623695015907288, 0.42989081144332886, -0.083778530359268188, 0.54562997817993164,
0.30040276050567627, -0.20358583331108093, -0.066405355930328369, -0.074463903903961182, -0.1065182238817215, -0.52227461338043213,
-0.34880521893501282, -0.18077594041824341, 0.20160204172134399, -0.30158936977386475, 0.019039005041122437, -0.36969810724258423,
0.050083786249160767, -0.60738110542297363, 0.07729727029800415, 0.0090279281139373779, -0.64650470018386841, -8.0704689025878906e-05,
0.25057768821716309, 0.2372361421585083, -0.036337584257125854, 0.23704862594604492, 0.039491534233093262, -0.22710219025611877,
1, 0.73357009887695312, 0.68238115310668945, 0.5019688606262207, 0.44186079502105713, -0.028133347630500793,
0.55320066213607788, 0.40258193016052246, 0.39616000652313232, -0.230362668633461, 0.27156621217727661, 0.23690204322338104,
0.29795548319816589, -0.29449045658111572, 0.057799652218818665, 0.47323822975158691, 0.25668269395828247, 0.59049677848815918,
0.32937467098236084, 0.40339884161949158, 0.26455980539321899, 0.52109384536743164, 0.27214369177818298, 0.78426218032836914,
0.60347634553909302, 0.21710552275180817, 0.68986523151397705, 0.078125521540641785, 0.21377477049827576, 0.68306785821914673,
-0.11419942229986191, 0.17115284502506256, 0.52712333202362061, 0.41221511363983154, 0.53484362363815308, 0.61876809597015381,
0.52441656589508057, -0.20007482171058655, 0.12893730401992798, 0.63048857450485229, 0.22569268941879272, 0.84674906730651855,
-0.08219541609287262, 0.70436948537826538, 0.43778914213180542, 0.24014560878276825, 0.11455842107534409, 0.17232556641101837,
1, 0.88617920875549316, 0.97199583053588867, 0.78462564945220947, -0.37416672706604004, 0.65452605485916138,
-0.03011023998260498, 0.096209734678268433, 0.47093483805656433, 0.5779569149017334, 0.32838302850723267, 0.40427330136299133,
0.36916851997375488, 0.75200796127319336, 0.29535776376724243, 0.61391866207122803, 0.73724770545959473, 0.17639839649200439,
0.57122063636779785, 0.39436200261116028, 0.62712693214416504, -0.023380041122436523, -0.72200047969818115, 0.52561599016189575,
0.12614762783050537, 0.065748006105422974, 0.8254934549331665, 0.38562110066413879, 0.56065928936004639, -0.043334692716598511,
0.050935804843902588, 0.25343599915504456, 0.82828956842422485, 0.48911136388778687, 0.84835970401763916, 0.6146996021270752,
-0.26955384016036987, 0.56133615970611572, 0.1938517689704895, 0.22064784169197083, 0.69589042663574219, -0.25831073522567749,
-0.18573784828186035, 0.60475343465805054, 0.20241522789001465, 0.079087823629379272, 0.2095884382724762, -0.13463228940963745,
0, -0.028409272432327271, -0.27611419558525085, 0.018428057432174683, -0.77827209234237671, 0.69043469429016113,
-0.64134418964385986, 0.023354409262537956, 0.049502827227115631, -0.34114056825637817, 0.13366381824016571, -0.4283776581287384,
-0.40745392441749573, -0.58860856294631958, -0.34831827878952026, -0.77368348836898804, -0.31088390946388245, -0.38999047875404358,
0.15395411849021912, 0.55506032705307007, 0.13811488449573517, 0.0072835353203117847, -0.60466790199279785, 0.33877205848693848,
0.50108051300048828, -0.50709176063537598, 0.44194495677947998, -0.29328224062919617, 0.61487019062042236, 0.46668422222137451,
-0.3804527223110199, -0.26545518636703491, 0.58890485763549805, 0.61111152172088623, 0.10440374165773392, -0.47901454567909241,
0.14588043093681335, -0.35672160983085632, -0.070560947060585022, 0.77705866098403931, -0.062809579074382782, -0.44701153039932251,
-0.48655569553375244, -0.030191509053111076, -0.011628937907516956, -0.45050784945487976, 0.47635746002197266, -0.5317990779876709,
0, -0.041977707296609879, -0.40500420331954956, 0.027651293203234673, -0.10952144861221313, 0.80618876218795776,
-0.89795750379562378, 0.28076139092445374, -0.033180814236402512, -0.35569274425506592, 0.38136017322540283, -0.18649247288703918,
0.60210776329040527, -0.91382640600204468, -0.22706937789916992, -0.47410178184509277, -0.47320199012756348, 0.55763673782348633,
-0.6392216682434082, 0.76691651344299316, 0.20295053720474243, 0.018359160050749779, -0.74434423446655273, -0.56319254636764526,
0.72181218862533569, -0.40647068619728088, 0.46476474404335022, -0.43311071395874023, 0.51348632574081421, 0.49173465371131897,
-0.54967004060745239, -0.27367344498634338, 0.48656249046325684, -0.16089022159576416, 0.074199676513671875, -0.23788656294345856,
0.24789351224899292, 0.087707452476024628, 0.1662621945142746, -0.28480252623558044, -0.12579271197319031, -0.27237728238105774,
-0.82546359300613403, 0.4554690420627594, 0.4902331531047821, -0.65352314710617065, 0.60638362169265747, -0.51600092649459839,
0, -0.15953902900218964, -0.12186985462903976, -0.029988802969455719, 0.091255120933055878, 0.64361858367919922,
-0.37532120943069458, 0.20940575003623962, -0.1101866140961647, -0.054073244333267212, -0.17592217028141022, -0.28259092569351196,
0.3102569580078125, -0.094162717461585999, 0.02513311430811882, -0.05974714457988739, -0.11000536382198334, -0.15663789212703705,
0.32856267690658569, -0.53556215763092041, -0.36638352274894714, -0.39442622661590576, 0.0212873425334692, 0.34901031851768494,
0.047373577952384949, 0.075111247599124908, -0.031708631664514542, -0.21028178930282593, -0.14607080817222595, 0.012796046212315559,
0.1614001989364624, 0.10262863337993622, 0.15581557154655457, 0.20330718159675598, -0.44249728322029114, 0.20627865195274353,
0.30719482898712158, -0.13346280157566071, 0.48935580253601074, -0.60161322355270386, -0.15388479828834534, 0.013778423890471458,
-0.023861687630414963, -0.3638615608215332, 0.037456557154655457, 0.45169520378112793, -0.53083956241607666, -0.50208085775375366,
0, 0.0094811180606484413, 0.092275001108646393, -3.3067129834307707e-07, 0.00060308969113975763, 0.15328279137611389,
0.14442868530750275, 0.31377288699150085, 0.52833563089370728, -0.17925742268562317, 0.41324624419212341, -0.2581934928894043,
-0.073981478810310364, 0.31282597780227661, -0.22588440775871277, -0.1498483419418335, 0.23575656116008759, 0.23833104968070984,
-0.51785320043563843, -0.10514416545629501, -0.20950523018836975, 0.20651023089885712, -0.16390326619148254, 0.014344861730933189,
0.41863614320755005, 0.32120940089225769, -0.12464677542448044, 0.37253296375274658, 0.049488555639982224, -0.019187469035387039,
0.13209591805934906, 0.42488124966621399, -0.16736531257629395, 0.050102021545171738, -0.3740977942943573, 0.00602343725040555,
0.029303396120667458, -0.061352383345365524, -0.34030729532241821, -0.026761936023831367, -0.27997970581054688, -0.28827336430549622,
-0.19134561717510223, 0.30152308940887451, 0.049985699355602264, -0.0042102113366127014, -0.26300352811813354, -0.42192238569259644,
1.0000001192092896, 0.96002960205078125, 0.87016075849533081, 0.81925332546234131, 0.99586522579193115, 0.62686508893966675,
0.49746590852737427, 0.66495537757873535, 0.017355442047119141, 0.59261065721511841, 0.32235696911811829, 0.57748961448669434,
0.33665454387664795, 0.33028149604797363, 0.22591854631900787, 0.59540677070617676, 0.39793270826339722, 0.73936796188354492,
0.44862973690032959, 0.44591262936592102, 0.50838345289230347, 0.3753657341003418, 0.63585180044174194, 0.35912275314331055,
0.88038730621337891, 0.39504164457321167, 0.60285180807113647, 0.51030510663986206, 0.70730596780776978, 0.8466721773147583,
0.77914899587631226, 0.6992652416229248, 0.55054497718811035, 0.66836130619049072, 0.56483334302902222, 0.49352246522903442,
0.8510468602180481, 0.89954501390457153, 0.58270084857940674, 0.39238131046295166, 0.6800767183303833, 0.28855237364768982,
0.90446346998214722, 0.42996031045913696, 0.60876142978668213, 0.72032064199447632, 0.74568474292755127, 0.30086806416511536,
0.42036199569702148, 0.41860434412956238, 0.41643244028091431, 0.16413655877113342, -0.3252185583114624, -0.052591621875762939,
0.21655440330505371, 0.57492160797119141, 0.13214884698390961, 0.21664366126060486, -0.41348919272422791, -0.59805738925933838,
-0.077270850539207458, 0.46595332026481628, -0.12790440022945404, 0.1609618067741394, 0.31449529528617859, 0.44277620315551758,
0.33570683002471924, -0.69404280185699463, -0.70727723836898804, -0.06579039990901947, -0.15203440189361572, -0.51187384128570557,
-0.47140002250671387, 0.28068765997886658, -0.43087771534919739, -0.36756056547164917, -0.052809298038482666, 0.19775843620300293,
-0.27154332399368286, -0.25044107437133789, 0.75118458271026611, 0.012734174728393555, 0.45411914587020874, -0.6566193699836731,
-0.45529714226722717, -0.20318031311035156, 0.36864462494850159, -0.41953527927398682, 0.10381464660167694, 0.55874341726303101,
0.093485429883003235, -0.031926989555358887, 0.056715428829193115, -0.037837415933609009, 0.6501230001449585, -0.099904611706733704,
0.21695902943611145, 0.21595858037471771, 0.19919329881668091, -0.012061448767781258, -0.10297100991010666, 0.01727006770670414,
0.13402476906776428, 0.31451195478439331, 0.028885900974273682, -0.0016078748740255833, -0.26490390300750732, -0.31450200080871582,
0.021790418773889542, 0.31104826927185059, -0.27809509634971619, -0.020762030035257339, 0.10030978173017502, 0.30658057332038879,
0.19250123202800751, -0.49474802613258362, -0.52733850479125977, -0.072667129337787628, -0.098196104168891907, -0.17775949835777283,
-0.26221463084220886, 0.20948967337608337, -0.33363038301467896, -0.24471493065357208, -0.016750801354646683, 0.1723962128162384,
-0.090449810028076172, -0.18116374313831329, 0.42787539958953857, -0.23066654801368713, 0.40331712365150452, -0.38269838690757751,
-0.31972315907478333, -0.14461356401443481, 0.21214291453361511, -0.30921244621276855, 0.13805437088012695, 0.18944309651851654,
-0.027499184012413025, 0.12831601500511169, -0.072569698095321655, -0.062825858592987061, 0.3105216920375824, 0.048264920711517334,
0.12455170601606369, 0.11910736560821533, 0.13616941869258881, 0.056667614728212357, -0.096246398985385895, -0.038354028016328812,
-0.0029135402292013168, 0.18456161022186279, 0.025249917060136795, 0.12168139219284058, -0.21024425327777863, -0.23182322084903717,
-0.061881713569164276, 0.25705352425575256, -0.12395599484443665, 0.058816168457269669, 0.10700991749763489, 0.074850596487522125,
0.14092437922954559, -0.23398396372795105, -0.21221354603767395, 0.11375299096107483, -0.013324666768312454, -0.24091698229312897,
-0.14697888493537903, 0.19608378410339355, -0.17871716618537903, -0.19924943149089813, -0.0072243367321789265, 0.00073772447649389505,
-0.16443480551242828, -0.13414217531681061, 0.2194371223449707, 0.028136897832155228, 0.1605977863073349, -0.27014818787574768,
-0.23213881254196167, -0.1173466295003891, 0.088675692677497864, -0.15636767446994781, 0.043896086513996124, 0.2128719836473465,
-0.0063446755520999432, -0.033104471862316132, 0.043424889445304871, 0.031735703349113464, 0.30647602677345276, -0.064178630709648132,
-0.57001006603240967, -0.57114940881729126, -0.58261233568191528, -0.50747555494308472, -0.57885944843292236, -0.84346580505371094,
-0.94723892211914062, -0.48302936553955078, -0.7470775842666626, -0.4697130024433136, -0.40853396058082581, -0.43537157773971558,
-0.68987447023391724, -0.16786277294158936, -0.27278527617454529, -0.65314716100692749, -0.64049196243286133, -0.70346397161483765,
-0.52754080295562744, -0.24291954934597015, -0.15863128006458282, -0.69898569583892822, -0.83388328552246094, -0.23773732781410217,
-0.63116359710693359, -0.40725374221801758, -0.43260744214057922, -0.46933624148368835, -0.79473906755447388, -0.91747474670410156,
-0.45886117219924927, -0.50019395351409912, -0.41115754842758179, -0.39238640666007996, -0.36490511894226074, -0.24885550141334534,
-0.23417037725448608, -0.54560369253158569, -0.72814357280731201, -0.38283562660217285, -0.76499110460281372, -0.29224234819412231,
-0.75272649526596069, -0.60552132129669189, -0.66269290447235107, -0.72198677062988281, -0.26384371519088745, -0.58525967597961426,
0, -0.11315911263227463, 0.30861356854438782, -0.69613516330718994, 0.262550950050354, -0.34493258595466614,
-0.034171439707279205, -0.6810142993927002, 0.2542567253112793, -0.020228587090969086, 0.34520891308784485, 0.35533961653709412,
-0.24014848470687866, -0.32887962460517883, -0.36506184935569763, 0.15002372860908508, 0.2620183527469635, -0.53340739011764526,
-0.18467897176742554, -0.015619382262229919, -0.070541180670261383, 0.4378109872341156, 0.48428142070770264, 0.68853467702865601,
-0.65699577331542969, 0.6208263635635376, -0.19029657542705536, 0.040571078658103943, -0.38368621468544006, 0.27367374300956726,
0.29835763573646545, 0.28358611464500427, -0.69379115104675293, 0.48044988512992859, 0.34045404195785522, -0.26717680692672729,
-0.30222681164741516, -0.66451287269592285, 0.18335132300853729, 0.32158946990966797, 0.34898200631141663, -0.71394991874694824,
-0.80893754959106445, -0.14827592670917511, 0.25113296508789062, 0.80894601345062256, -0.25851470232009888, 0.34696891903877258,
1, 0.88786256313323975, 0.97455096244812012, 0.87071263790130615, 0.33814206719398499, -0.19888584315776825,
0.37155017256736755, 0.40579298138618469, 0.6870577335357666, 0.24187254905700684, 0.20800615847110748, -0.42256742715835571,
0.46718296408653259, 0.44925668835639954, 0.31208810210227966, -0.16672590374946594, 0.449668288230896, -0.094633415341377258,
-0.31234610080718994, -0.21810318529605865, 0.77632009983062744, 0.29686489701271057, 0.47858405113220215, 0.090464100241661072,
0.80984377861022949, 0.57419729232788086, 0.66938120126724243, 0.66014599800109863, 0.83729279041290283, 0.2689535915851593,
0.54439073801040649, -0.4537414014339447, 0.17213812470436096, 0.61960381269454956, 0.14490222930908203, 0.80659842491149902,
0.68352323770523071, 0.035448171198368073, 0.5290338397026062, 0.58085358142852783, -0.061546862125396729, -0.15642115473747253,
0.26052555441856384, -0.22825253009796143, 0.40727478265762329, 0.047243617475032806, 0.20207855105400085, 0.21679463982582092,
0, 0.034803394228219986, -0.041858378797769547, -0.15476331114768982, -0.36070361733436584, -0.51300352811813354,
-0.22154515981674194, 0.45577549934387207, -0.38082355260848999, -0.30062299966812134, -0.4381374716758728, -0.14724704623222351,
0.2903362512588501, -0.36953872442245483, 0.3067854642868042, 0.0079705687239766121, -0.12447117269039154, -0.49152290821075439,
-0.23637984693050385, 0.076165027916431427, -0.56019455194473267, 0.24196702241897583, -0.40880307555198669, -0.061335381120443344,
0.10266898572444916, 0.12441429495811462, 0.40181741118431091, -0.3809991180896759, 0.23859122395515442, -0.39876028895378113,
-0.076345749199390411, 0.26663550734519958, -0.081209398806095123, 0.34303018450737, 0.14846184849739075, -0.053993590176105499,
-0.15493583679199219, 0.059878069907426834, -0.19934296607971191, -0.28171753883361816, 0.16782569885253906, 0.28325843811035156,
-0.06396128237247467, -0.0041198269464075565, -0.34261029958724976, 0.33655542135238647, 0.071043066680431366, 0.17273099720478058,
0, 0.11227743327617645, -0.10599201917648315, -0.0089622437953948975, 0.12776212394237518, 0.1544734388589859,
-0.11354729533195496, -0.12572810053825378, -0.30838614702224731, 0.037229686975479126, -0.40940365195274353, 0.42861717939376831,
-0.089185014367103577, -0.35600921511650085, 0.33317935466766357, 0.036941647529602051, -0.30634558200836182, 0.24188739061355591,
0.091234579682350159, -0.47667434811592102, 0.36062914133071899, -0.76870429515838623, -0.42011934518814087, -0.43713179230690002,
0.39185124635696411, -0.07880709320306778, -0.31818738579750061, 0.35563230514526367, 0.06436900794506073, 0.22041501104831696,
-0.22947996854782104, -0.20245464146137238, -0.31979066133499146, -0.50795555114746094, 0.56407654285430908, -0.057144895195960999,
-0.38623350858688354, -0.15956345200538635, -0.33767271041870117, -0.31971070170402527, 0.51698368787765503, 0.54752326011657715,
-0.36447671055793762, 0.45329076051712036, 0.50995802879333496, 0.2507341206073761, 0.22593565285205841, 0.0039921700954437256
};
+15
View File
@@ -0,0 +1,15 @@
{
"format": 1,
"packages": [
],
"root": {
"dependencies": {},
"name": "noise"
},
"toolchain": {
"commit": "6dfa969c4764745cbfcbfbbf1153fb02cb9f1fa1",
"ref": "master",
"url": "https://github.com/ziranlang/ziran.git"
}
}
+10
View File
@@ -0,0 +1,10 @@
[package]
name = "noise"
module_roots = ["src", "tests"]
[toolchain]
git = "https://github.com/ziranlang/ziran.git"
ref = "master"
[exports]
fast_noise = "src/fast_noise.zi"