1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-22 22:35:18 +02:00

seed 0 ~ 255

This commit is contained in:
Justin Lin
2020-03-06 11:21:23 +08:00
parent 2e0e06f12d
commit 83bd7aa9d2

View File

@@ -2,5 +2,5 @@ use <util/rand.scad>;
use <experimental/_impl/_pnoise1.scad>;
function pnoise1(xs, seed) =
let(sd = is_undef(seed) ? floor(rand(0, 256)) : seed)
let(sd = is_undef(seed) ? floor(rand(0, 256)) : seed % 256)
[for(x = xs) _pnoise1(x, sd)];