mirror of
https://github.com/tim-beatham/smegmesh.git
synced 2025-08-16 16:11:06 +02:00
Automatically remove nodes from the mesh after a
certain threshold.
This commit is contained in:
@ -9,7 +9,7 @@ func RandomSubsetOfLength[V any](vs []V, num int) []V {
|
||||
selectedIndices := make(map[int]struct{})
|
||||
|
||||
for i := 0; i < num; {
|
||||
if len(selectedIndices) == len(vs) {
|
||||
if len(randomSubset) == len(vs) {
|
||||
return randomSubset
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user