Handbook
Glossary
fix-left-chunk ( left right ymin ymax -- left' )
Vocabulary
ui
.
gadgets
.
charts
.
lines
.
private
Inputs
left
an
object
right
an
object
ymin
an
object
ymax
an
object
Outputs
left'
an
object
Definition
USING:
arrays
combinators.short-circuit
kernel
math
sequences
;
IN:
ui.gadgets.charts.lines.private
::
fix-left-chunk
( left right ymin ymax -- left' )
left
last
:>
left-point right
first
:>
right-point
left-point
y
right-point
y
{
[
{
[
drop
ymin
=
]
[
>
]
}
2&&
]
[
{
[
drop
ymax
=
]
[
<
]
}
2&&
]
}
2||
[
left
]
[
left-point
y
right-point
y
>
ymin ymax
?
:>
y-coord left-point
x
right-point
x
=
[
left-point
x
y-coord
2array
]
[
left-point right-point
calc-line-slope
y-coord left-point
calc-point-y
]
if
left
swap
suffix
]
if
;