mirror of
https://github.com/nophead/NopSCADlib.git
synced 2025-08-23 15:43:39 +02:00
Single backtick now used for all code quotes.
This commit is contained in:
@@ -22,11 +22,11 @@
|
||||
//
|
||||
include <../global_defs.scad>
|
||||
|
||||
function layout_offset(widths, i, gap = 2) = //! Calculate the offset for the ```i```th item
|
||||
function layout_offset(widths, i, gap = 2) = //! Calculate the offset for the `i`th item
|
||||
i == 0 ? widths[0] / 2
|
||||
: layout_offset(widths, i - 1, gap) + widths[i - 1] / 2 + gap + widths[i] / 2;
|
||||
|
||||
module layout(widths, gap = 2, no_offset = false) //! Layout children passing ```$i```
|
||||
module layout(widths, gap = 2, no_offset = false) //! Layout children passing `$i`
|
||||
translate([no_offset ? -widths[0] / 2 : 0, 0])
|
||||
for($i = [0 : 1 : len(widths) - 1])
|
||||
translate([layout_offset(widths, $i, gap), 0])
|
||||
|
Reference in New Issue
Block a user