Add 'cozette-sml/' from commit '5ee4d063750e4b57ef9abf2d8ca19a3811ad73a1'

git-subtree-dir: cozette-sml
git-subtree-mainline: bbdbe022f3
git-subtree-split: 5ee4d06375
This commit is contained in:
2026-04-24 00:35:35 +01:00
197 changed files with 22762 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
structure AsciiDot =
struct
fun xToNdc (xOffset, xpos, scale, halfWidth) =
((xpos * scale + xOffset) - halfWidth) / halfWidth
fun yToNdc (yOffset, ypos, scale, halfHeight) =
~(((ypos * scale + yOffset) - halfHeight) / halfHeight)
fun lerp (xOffset: Real32.real, yOffset, z, scale, windowWidth, windowHeight,
r, g, b) =
let
val halfWidth = windowWidth / 2.0
val halfHeight = windowHeight / 2.0
in
#[
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
z,
r, g, b,
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
z,
r, g, b,
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
z,
r, g, b,
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
z,
r, g, b,
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
z,
r, g, b,
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
z,
r, g, b
]
end
end