formatt a couple of files
This commit is contained in:
@@ -5,8 +5,8 @@ end
|
||||
|
||||
structure GraphLines :> GRAPH_LINES =
|
||||
struct
|
||||
fun helpGenGraphLinesX (pos, xClickPoints, yClickPoints, acc,
|
||||
windowWidth, windowHeight) =
|
||||
fun helpGenGraphLinesX
|
||||
(pos, xClickPoints, yClickPoints, acc, windowWidth, windowHeight) =
|
||||
if pos = Vector.length xClickPoints then
|
||||
Vector.concat acc
|
||||
else
|
||||
@@ -21,7 +21,7 @@ struct
|
||||
val minY = Vector.sub (xClickPoints, 0)
|
||||
val minY = (~(minY - halfHeight)) / halfHeight
|
||||
val maxY = Vector.sub (xClickPoints, Vector.length xClickPoints - 1)
|
||||
val maxY = (~(maxY - halfHeight)) /halfHeight
|
||||
val maxY = (~(maxY - halfHeight)) / halfHeight
|
||||
|
||||
val acc = Ndc.ltrbToVertex (minusX, maxY, plusX, minY) :: acc
|
||||
in
|
||||
@@ -29,8 +29,8 @@ struct
|
||||
(pos + 1, xClickPoints, yClickPoints, acc, windowWidth, windowHeight)
|
||||
end
|
||||
|
||||
fun helpGenGraphLinesY (pos, yClickPoints, xClickPoints, acc,
|
||||
windowWidth, windowHeight) =
|
||||
fun helpGenGraphLinesY
|
||||
(pos, yClickPoints, xClickPoints, acc, windowWidth, windowHeight) =
|
||||
if pos = Vector.length yClickPoints then
|
||||
acc
|
||||
else
|
||||
@@ -56,16 +56,16 @@ struct
|
||||
end
|
||||
|
||||
fun helpGenerate (windowWidth, windowHeight, xClickPoints, yClickPoints) =
|
||||
let
|
||||
val acc = helpGenGraphLinesY (0, yClickPoints, xClickPoints, [], windowWidth, windowHeight)
|
||||
in
|
||||
helpGenGraphLinesX (0, xClickPoints, yClickPoints, acc, windowWidth, windowHeight)
|
||||
end
|
||||
|
||||
fun generate (app: AppType.app_type) =
|
||||
let
|
||||
val {windowWidth, windowHeight, xClickPoints, yClickPoints, ...} = app
|
||||
val acc = helpGenGraphLinesY
|
||||
(0, yClickPoints, xClickPoints, [], windowWidth, windowHeight)
|
||||
in
|
||||
helpGenerate (windowWidth, windowHeight, xClickPoints, yClickPoints)
|
||||
helpGenGraphLinesX
|
||||
(0, xClickPoints, yClickPoints, acc, windowWidth, windowHeight)
|
||||
end
|
||||
|
||||
fun generate (app: AppType.app_type) =
|
||||
let val {windowWidth, windowHeight, xClickPoints, yClickPoints, ...} = app
|
||||
in helpGenerate (windowWidth, windowHeight, xClickPoints, yClickPoints)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user