1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-09-24 21:41:33 +02:00
Files
dotSCAD/docs/lib3x-swap.md
Justin Lin ba745af20d update doc
2021-03-07 09:45:19 +08:00

268 B

swap

Swaps two elements in a list.

Since: 3.0

Parameters

  • lt : The list.
  • i : The index of one element.
  • j : The index of the other element

Examples

use <util/swap.scad>;

assert(swap([10, 20, 30, 40], 1, 3) == [10, 40, 30, 20]);