gridVertices :: MeshSize -> [R2]
gridVertices (cols,rows) = liftA2 vert [0 .. cols-1] [0 .. rows-1]
 where
   vert i j = V.vec2 (f i cols) (f j rows)
   f l n = -- fromIntegral l / fromIntegral (n-1) - 0.5
           2 * fromIntegral l / fromIntegral (n-1) - 1


-- | Grid of given dimension
gridVertices :: MeshSize -> [R2]
gridVertices (cols,rows) = liftA2 vert [0 .. cols-1] [0 .. rows-1]
 where
   vert i j = V.vec2 (f i cols) (f j rows)
   f l n = -- fromIntegral l / fromIntegral (n-1) - 0.5
           2 * fromIntegral l / fromIntegral (n-1) - 1


-- | Grid of given dimension
gridVertices (cols,rows) = liftA2 vert [0 .. cols-1] [0 .. rows-1]
 where
   vert i j = V.vec2 (f i cols) (f j rows)
   f l n = -- fromIntegral l / fromIntegral (n-1) - 0.5
           2 * fromIntegral l / fromIntegral (n-1) - 1


-- | Grid of given dimension