diff --git a/dotscape b/dotscape index 95450d8..b876354 100755 Binary files a/dotscape and b/dotscape differ diff --git a/fcore/graph-lines.sml b/fcore/graph-lines.sml index bd35199..e6e180e 100644 --- a/fcore/graph-lines.sml +++ b/fcore/graph-lines.sml @@ -11,8 +11,8 @@ struct Vector.concat acc else let - val halfWidth = Real32.fromInt (windowWidth div 2) - val halfHeight = Real32.fromInt (windowHeight div 2) + val halfWidth = Real32.fromInt windowWidth / 2.0 + val halfHeight = Real32.fromInt windowHeight / 2.0 val curX = Vector.sub (xClickPoints, pos) val minusX = (curX - halfWidth - 1.0) / halfWidth @@ -35,14 +35,12 @@ struct acc else let - val halfWidth = windowHeight div 2 - val halfWidth = Real32.fromInt halfWidth - val halfHeight = windowHeight div 2 - val halfHeight = Real32.fromInt halfHeight + val halfWidth = Real32.fromInt windowWidth / 2.0 + val halfHeight = Real32.fromInt windowHeight / 2.0 val curY = Vector.sub (yClickPoints, pos) - val minusY = ~(curY - halfHeight - 1.0) / halfHeight - val plusY = ~(curY - halfHeight + 1.0) / halfHeight + val minusY = (~(curY - halfHeight - 1.0)) / halfHeight + val plusY = (~(curY - halfHeight + 1.0)) / halfHeight val minX = Vector.sub (xClickPoints, 0) val minX = (minX - halfWidth) / halfWidth