summaryrefslogtreecommitdiff
path: root/lib/stitches
diff options
context:
space:
mode:
authorLex Neva <github.com@lexneva.name>2023-01-16 14:34:29 -0500
committerLex Neva <github.com@lexneva.name>2023-02-20 15:27:55 -0500
commite2965e78f03fb41c9a02c92ef120caf038b837ae (patch)
treeb91db6da842e2ca00d74de1c55c4beac993f42b7 /lib/stitches
parent85f921cd33b402733cea4ce53206aa70a6092d49 (diff)
use snake case
per python coding standard
Diffstat (limited to 'lib/stitches')
-rw-r--r--lib/stitches/running_stitch.py6
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