1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-01 04:20:27 +02:00

clean unnecessary code

This commit is contained in:
Justin Lin
2020-03-06 10:10:25 +08:00
parent 1976798c64
commit 2eb1faf550
2 changed files with 3 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
use <experimental/_impl/_pnoise_comm.scad>;
function _pnoise1(x, n, seed) =
function _pnoise1(x, seed) =
let(
xi = floor(x),
xf = x - floor(x),

View File

@@ -2,13 +2,8 @@ use <util/rand.scad>;
use <experimental/_impl/_pnoise1.scad>;
function pnoise1(xs, seed) =
let(
from = floor(min(xs)),
to = ceil(max(xs)),
n = to - from + 1,
sd = is_undef(seed) ? floor(rand(0, 256)) : seed
)
let(sd = is_undef(seed) ? floor(rand(0, 256)) : seed)
[
for(x = xs)
_pnoise1(x, n, sd)
_pnoise1(x, sd)
];