Skip to content

Commit 3282b7d

Browse files
committed
Adding shuffle function to math.py
1 parent f7f8b82 commit 3282b7d

File tree

1 file changed

+4
-0
lines changed
  • py5_resources/py5_module/py5/mixins

1 file changed

+4
-0
lines changed

py5_resources/py5_module/py5/mixins/math.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,10 @@ def random_sample(
352352
else:
353353
return []
354354

355+
def shuffle(self, objects: list[Any]) -> list[Any]:
356+
"""$class_Sketch_shuffle"""
357+
return self.random_sample(objects, len(objects), False)
358+
355359
@overload
356360
def random_gaussian(self) -> float:
357361
"""$class_Sketch_random_gaussian"""

0 commit comments

Comments
 (0)