address edge case where Real32.toString 1.0 seems to give the string '1' instead of '1.0', and improve the drawing for upper case A
This commit is contained in:
50
a.sml
50
a.sml
@@ -1,4 +1,4 @@
|
||||
structure LowerCaseA =
|
||||
structure UpperCaseA =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight) : Real32.real vector =
|
||||
let
|
||||
@@ -10,18 +10,42 @@ struct
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.47499999404)) + (endX * 0.47499999404)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.700000047684)) + (endY * 0.700000047684)) / windowHeight) - 1.0,
|
||||
(((startX * (1.0 - 0.299999982119)) + (endX * 0.299999982119)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.675000011921)) + (endY * 0.675000011921)) / windowHeight) - 1.0,
|
||||
#[ (((startX * (1.0 - 0.724999964237)) + (endX * 0.724999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.325000017881)) + (endY * 0.325000017881)) / windowHeight) - 1.0,
|
||||
(((startX * (1.0 - 0.324999988079)) + (endX * 0.324999988079)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.474999964237)) + (endY * 0.474999964237)) / windowHeight) - 1.0,
|
||||
(((startX * (1.0 - 0.674999952316)) + (endX * 0.674999952316)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.474999964237)) + (endY * 0.474999964237)) / windowHeight) - 1.0,
|
||||
(((startX * (1.0 - 0.324999988079)) + (endX * 0.324999988079)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.474999964237)) + (endY * 0.474999964237)) / windowHeight) - 1.0,
|
||||
(((startX * (1.0 - 0.274999976158)) + (endX * 0.274999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.325000017881)) + (endY * 0.325000017881)) / windowHeight) - 1.0,
|
||||
(((startX * (1.0 - 0.724999964237)) + (endX * 0.724999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.325000017881)) + (endY * 0.325000017881)) / windowHeight) - 1.0,
|
||||
(((startX * (1.0 - 0.449999988079)) + (endX * 0.449999988079)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.550000011921)) + (endY * 0.550000011921)) / windowHeight) - 1.0,
|
||||
(((startX * (1.0 - 0.625)) + (endX * 0.625)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.275000035763)) + (endY * 0.275000035763)) / windowHeight) - 1.0,
|
||||
(((startX * (1.0 - 0.799999952316)) + (endX * 0.799999952316)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0,
|
||||
(((startX * (1.0 - 0.524999976158)) + (endX * 0.524999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.524999976158)) + (endY * 0.524999976158)) / windowHeight) - 1.0
|
||||
(((startY * (1.0 - 1.0)) + (endY * 1.0)) / windowHeight) - 1.0,
|
||||
(((startX * (1.0 - 0.600000023842)) + (endX * 0.600000023842)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 1.0)) + (endY * 1.0)) / windowHeight) - 1.0,
|
||||
(((startX * (1.0 - 1.0)) + (endX * 1.0)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.0)) + (endY * 0.0)) / windowHeight) - 1.0,
|
||||
(((startX * (1.0 - 1.0)) + (endX * 1.0)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.0)) + (endY * 0.0)) / windowHeight) - 1.0,
|
||||
(((startX * (1.0 - 0.850000023842)) + (endX * 0.850000023842)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.0)) + (endY * 0.0)) / windowHeight) - 1.0,
|
||||
(((startX * (1.0 - 0.449999988079)) + (endX * 0.449999988079)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 1.0)) + (endY * 1.0)) / windowHeight) - 1.0,
|
||||
(((startX * (1.0 - 0.550000011921)) + (endX * 0.550000011921)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 1.0)) + (endY * 1.0)) / windowHeight) - 1.0,
|
||||
(((startX * (1.0 - 0.40000000596)) + (endX * 0.40000000596)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 1.0)) + (endY * 1.0)) / windowHeight) - 1.0,
|
||||
(((startX * (1.0 - 0.0)) + (endX * 0.0)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.0)) + (endY * 0.0)) / windowHeight) - 1.0,
|
||||
(((startX * (1.0 - 0.0)) + (endX * 0.0)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.0)) + (endY * 0.0)) / windowHeight) - 1.0,
|
||||
(((startX * (1.0 - 0.15000000596)) + (endX * 0.15000000596)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.0)) + (endY * 0.0)) / windowHeight) - 1.0,
|
||||
(((startX * (1.0 - 0.550000011921)) + (endX * 0.550000011921)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 1.0)) + (endY * 1.0)) / windowHeight) - 1.0
|
||||
]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user