FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
luaplot/plotiteratorfactory.lua at master · thewizardplusplus/luaplot · GitHub
thewizardplusplus
/
luaplot
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
1
Code
Issues
0
Pull requests
0
Actions
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
luaplot
/
plotiteratorfactory.lua
Copy path
More file actions
More file actions
Latest commit
History
History
History
34 lines (26 loc) · 847 Bytes
Breadcrumbs
luaplot
/
plotiteratorfactory.lua
Copy path
File metadata and controls
34 lines (26 loc) · 847 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
---
--
@
classmod
PlotIteratorFactory
local
middleclass
=
require
(
"
middleclass
"
)
local
assertions
=
require
(
"
luatypechecks.assertions
"
)
local
Plot
=
require
(
"
luaplot.plot
"
)
local
PlotIterator
=
require
(
"
luaplot.plotiterator
"
)
---
--
@table instance
--
@
tfield
func _transformer func(index: number, point: number): any
local
PlotIteratorFactory
=
middleclass
(
"
PlotIteratorFactory
"
)
---
--
@
function
new
--
@
tparam
func transformer func(index: number, point: number): any
--
@
treturn
PlotIteratorFactory
function
PlotIteratorFactory
:
initialize
(
transformer
)
assertions
.
is_callable
(
transformer
)
self
.
_transformer
=
transformer
end
---
--
@
tparam
Plot plot
--
@
treturn
PlotIterator
function
PlotIteratorFactory
:
with
(
plot
)
assertions
.
is_instance
(
plot
,
Plot
)
return
PlotIterator
:
new
(
plot
,
self
.
_transformer
)
end
return
PlotIteratorFactory
Back
|
FazBrowse Home
|
New Git URL