Skip to content

Commit a2db15d

Browse files
committed
Fix stuttering noise in samples
`time.perf_counter` can begin with values too high for noise samples
1 parent 6587324 commit a2db15d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎examples/samples_tcod.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def get_corner_colors(self) -> NDArray[np.uint8]:
156156
[6, 7, 8],
157157
[9, 10, 11],
158158
],
159-
time.perf_counter(), # j coordinate is time broadcast to all samples
159+
_get_elapsed_time(), # j coordinate is time broadcast to all samples
160160
)
161161
colors = self.noise[noise_samples_ij]
162162
colors = ((colors + 1.0) * (0.5 * 255.0)).clip(min=0, max=255) # Convert -1..1 to 0..255

0 commit comments

Comments
 (0)