formatt a couple of files

This commit is contained in:
2025-07-11 00:57:55 +01:00
parent d5fda8b488
commit 024f1293c0
2 changed files with 46 additions and 24 deletions

View File

@@ -149,8 +149,7 @@ struct
val xpos = Vector.sub (xClickPoints, hIdx)
val ypos = Vector.sub (yClickPoints, vIdx)
val model = AppWith.addSquare
(model, hIdx, vIdx, hIdx, vIdx)
val model = AppWith.addSquare (model, hIdx, vIdx, hIdx, vIdx)
val squares = #squares model
val dotVec = getDotVecFromIndices (model, hIdx, vIdx)
@@ -159,9 +158,16 @@ struct
val halfHeight = Real32.fromInt (windowHeight div 2)
val maxSide = Int.max (canvasWidth, canvasHeight)
val squares =
CollisionTree.toTriangles (windowWidth, windowHeight, squares, maxSide,
canvasWidth, canvasHeight, xClickPoints, yClickPoints)
val squares = CollisionTree.toTriangles
( windowWidth
, windowHeight
, squares
, maxSide
, canvasWidth
, canvasHeight
, xClickPoints
, yClickPoints
)
val drawMsg = DRAW_SQUARES_AND_DOTS {squares = squares, dots = dotVec}
in
(model, [DRAW drawMsg])
@@ -181,13 +187,29 @@ struct
let
val model = AppWith.windowResize (model, width, height)
val {squares, canvasWidth, canvasHeight, showGraph, arrowX, arrowY,
xClickPoints, yClickPoints, ...} =
model
val
{ squares
, canvasWidth
, canvasHeight
, showGraph
, arrowX
, arrowY
, xClickPoints
, yClickPoints
, ...
} = model
val maxSide = Int.max (canvasWidth, canvasHeight)
val squares = CollisionTree.toTriangles (width, height, squares, maxSide,
canvasWidth, canvasHeight, xClickPoints, yClickPoints)
val squares = CollisionTree.toTriangles
( width
, height
, squares
, maxSide
, canvasWidth
, canvasHeight
, xClickPoints
, yClickPoints
)
val graphLines =
if showGraph then GraphLines.generate model else Vector.fromList []