formatting

This commit is contained in:
2024-07-31 22:28:42 +01:00
parent 16fa1e49af
commit 818503d0ac
3 changed files with 6 additions and 8 deletions

View File

@@ -12,8 +12,8 @@ end
message-types/input-msg.sml
message-types/draw-msg.sml
functional-core/app-type.sml
ann
"allowVectorExps true"
in

View File

@@ -142,8 +142,7 @@ struct
fun getTriangleStageVector (model: app_type, drawVec) =
case #triangleStage model of
NO_TRIANGLE => drawVec
| FIRST {x1, y1} =>
getFirstTriangleStageVector (x1, y1, drawVec)
| FIRST {x1, y1} => getFirstTriangleStageVector (x1, y1, drawVec)
| SECOND {x1, y1, x2, y2} =>
getSecondTriangleStageVector (x1, y1, x2, y2, drawVec)
@@ -189,7 +188,7 @@ struct
end
| FIRST {x1, y1} =>
let
val drawVec =
val drawVec =
getFirstTriangleStageVector (x1, y1, buttonVec)
val drawMsg = DRAW_BUTTON drawVec
@@ -202,9 +201,8 @@ struct
end
| SECOND {x1, y1, x2, y2} =>
let
val model =
AppType.addTriangleAndResetStage
(model, x1, y1, x2, y2, hpos, vpos)
val model = AppType.addTriangleAndResetStage
(model, x1, y1, x2, y2, hpos, vpos)
val drawVec = getTrianglesVector model
val drawMsg = DRAW_TRIANGLES_AND_RESET_BUTTONS drawVec

View File

@@ -72,7 +72,7 @@ struct
let
val _ = AppDraw.uploadTrianglesVector (triangleDrawObject, triangleVec)
val triangleDrawLength = Vector.length triangleVec div 2
(* have to reset buttons too *)
(* buttons are reset by setting buttonDrawLength to 0 *)
in
draw
( drawMailbox