diff options
| author | Lex Neva <github.com@lexneva.name> | 2023-01-16 14:34:29 -0500 |
|---|---|---|
| committer | Lex Neva <github.com@lexneva.name> | 2023-02-20 15:27:55 -0500 |
| commit | e2965e78f03fb41c9a02c92ef120caf038b837ae (patch) | |
| tree | b91db6da842e2ca00d74de1c55c4beac993f42b7 /lib/stitches/running_stitch.py | |
| parent | 85f921cd33b402733cea4ce53206aa70a6092d49 (diff) | |
use snake case
per python coding standard
Diffstat (limited to 'lib/stitches/running_stitch.py')
| -rw-r--r-- | lib/stitches/running_stitch.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/stitches/running_stitch.py b/lib/stitches/running_stitch.py index 8ba53498..1dbfcaaf 100644 --- a/lib/stitches/running_stitch.py +++ b/lib/stitches/running_stitch.py @@ -24,7 +24,7 @@ def split_segment_even_n(a, b, segments: int, jitter_sigma: float = 0.0, random_ splits = np.array(range(1, segments)) / segments if random_seed is not None: - jitters = (prng.nUniformFloats(len(splits), random_seed) * 2) - 1 + jitters = (prng.n_uniform_floats(len(splits), random_seed) * 2) - 1 splits = splits + jitters * (jitter_sigma / segments) # sort the splits in case a bad roll transposes any of them @@ -39,12 +39,12 @@ def split_segment_even_dist(a, b, max_length: float, jitter_sigma: float = 0.0, def split_segment_random_phase(a, b, length: float, length_sigma: float, random_seed: str) -> typing.List[shgeo.Point]: line = shgeo.LineString([a, b]) - progress = length * prng.uniformFloats(random_seed, "phase")[0] + progress = length * prng.uniform_floats(random_seed, "phase")[0] splits = [progress] distance = line.length if progress >= distance: return [] - for x in prng.iterUniformFloats(random_seed): + for x in prng.iter_uniform_floats(random_seed): progress += length * (1 + length_sigma * (x - 0.5) * 2) if progress >= distance: break |
