VEC: Fix the inRange function
It now takes a PROPER square, as in ((xmin, ymin), (xmax, ymax)) instead of ((xmin, xmax), (ymin, ymax)) and also works with negative values. Because the meaning of the arguments has changed, we also had to fix all uses of it.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
module GUI.Gtk (makeGUI) where
|
||||
|
||||
import Algebra.Vector (dimToSquare)
|
||||
import Control.Applicative
|
||||
import Control.Monad(unless)
|
||||
import Control.Monad.IO.Class
|
||||
@@ -308,8 +309,9 @@ saveAndDrawDiag fp fps mygui =
|
||||
haveGrid = gridActive,
|
||||
showCoordText = coordTextActive,
|
||||
quadPath = quadPathEntry',
|
||||
rangeSquare = (fromMaybe (0, 500) rxDim,
|
||||
fromMaybe (0, 500) ryDim)
|
||||
rangeSquare = case (rxDim, ryDim) of
|
||||
(Just xd', Just yd') -> dimToSquare xd' yd'
|
||||
_ -> ((0, 0), (500, 500))
|
||||
})
|
||||
mesh)
|
||||
(s, r) = renderDiag daW daH diagS
|
||||
|
||||
Reference in New Issue
Block a user