Template:SB tree/doc: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
ArrowHead294 (talk | contribs)
No edit summary
Ganaram inukshuk (talk | contribs)
m Template has not been a dependency for any other module for a while
 
(7 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{dochead}}
{{dochead}}{{lua}}
This template is used to create a Stern–Brocot tree, given a pair of starting ratios and a depth.
 
=== Usage ===
=== Usage ===
No parameters are required, but will accept up to 5.
No parameters are required, but will accept up to 5.<br /><br />
{| class="wikitable center-all" style="margin: auto auto auto auto;"
 
|+ Parameters
; <code>Start Ratio</code>
! Parameter !! Required? !! Description
: The starting ratio for the SB tree. The default is 1/1.
|-
 
| Start Ratio || rowspan="5" | No (optional) || The starting ratio for the SB tree. The default is 1/1.
; <code>Stop Ratio</code>
|-
: The stopping ratio for the SB tree. The default is 1/0.
| Stop Ratio || The stopping ratio for the SB tree. The default is 1/0.
 
|-
; <code>Depth</code>
| Depth || How many layers from the starting ratio the tree should extend. The default is 4 layers.
: How many layers from the starting ratio the tree should extend. The default is 4 layers.
|-
 
| Edge Extend || How many additional layers the edges should be extended. The default is 0 layers.
; <code>Edge Extend</code>
|-
: How many additional layers the edges should be extended. The default is 0 layers.
| Stagger Ratios || Whether to display ratios in a staggered formation (spans multiple columns) or in only one column. The default is true.
|}


=== See also ===
; <code>Stagger Ratios</code>
* [[Module:SB tree]] &ndash; The Lua module that implements the functionality.
: Whether to display ratios in a staggered formation (spans multiple columns) or in only one column. The default is true.

Latest revision as of 01:41, 21 June 2025

This template is used to create a Stern–Brocot tree, given a pair of starting ratios and a depth.

Usage

No parameters are required, but will accept up to 5.

Start Ratio
The starting ratio for the SB tree. The default is 1/1.
Stop Ratio
The stopping ratio for the SB tree. The default is 1/0.
Depth
How many layers from the starting ratio the tree should extend. The default is 4 layers.
Edge Extend
How many additional layers the edges should be extended. The default is 0 layers.
Stagger Ratios
Whether to display ratios in a staggered formation (spans multiple columns) or in only one column. The default is true.