Range consolidation: Difference between revisions

Content added Content deleted
Line 510: Line 510:
func Pt.min() => min(this::s, this::e)
func Pt.min() => min(this::s, this::e)
func Pt.max() => max(this::s, this::e)
func Pt.max() => max(this::s, this::e)
func Pt.toString() => "(\(this::s), \(this::e))"


let rng = [
let rng = [
Line 549: Line 550:
{{out}}
{{out}}


<pre>[(s: 1.1, e: 2.2)]
<pre>[(1.1, 2.2)]
[(s: 6.1, e: 8.3)]
[(6.1, 8.3)]
[(s: 1, e: 2), (s: 3, e: 4)]
[(1, 2), (3, 4)]
[(s: -1, e: 2), (s: 3, e: 10)]
[(-1, 2), (3, 10)]
[(s: -6, e: -1), (s: 1, e: 8)]</pre>
[(-6, -1), (1, 8)]</pre>


=={{header|Go}}==
=={{header|Go}}==