1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-09 16:26:47 +02:00

don't swap when i == j

This commit is contained in:
Justin Lin
2021-02-27 19:58:40 +08:00
parent df8cbba07c
commit d41a644f5d
2 changed files with 3 additions and 0 deletions

View File

@@ -22,6 +22,8 @@ New modules/functions
- `util/spherical_coordinate`
- `util/every`
- `util/some`
- `util/swap`?
- `util/shuffle`?
- delete `m_cumulate`
- delete `trianglate`, use `tri_ear_clipping`?

View File

@@ -1,4 +1,5 @@
function swap(lt, i, j) =
i == j ? lt :
let(
leng = len(lt),
a = min([i, j]),