progress fixing bugs in generated export string
This commit is contained in:
@@ -25,16 +25,14 @@ struct
|
||||
fun fromPixelX (xpos, windowWidth, windowHeight) =
|
||||
let
|
||||
val halfWidth = Real32.fromInt windowWidth / 2.0
|
||||
val xpos = xpos - halfWidth
|
||||
in
|
||||
xpos / halfWidth
|
||||
(xpos - halfWidth) / halfWidth
|
||||
end
|
||||
|
||||
fun fromPixelY (ypos, windowWidth, windowHeight) =
|
||||
let
|
||||
val halfHeight = Real32.fromInt windowHeight / 2.0
|
||||
val ypos = ~(ypos - halfHeight)
|
||||
in
|
||||
ypos / halfHeight
|
||||
~((ypos - halfHeight) / halfHeight)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user