From 1377a427dd43a509b101484bab111422fd04c42c Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Sat, 16 Mar 2019 00:45:04 -0400 Subject: simplify --- shelves.hs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/shelves.hs b/shelves.hs index 0ea28ee..c6364e1 100644 --- a/shelves.hs +++ b/shelves.hs @@ -22,13 +22,10 @@ data Shelf = Shelf { shelfSideDimX :: Inches } -shelfDim :: Shelf -> V3 Inches -shelfDim Shelf{..} = V3 shelfLength shelfWidth shelfThickness - shelves' :: Shelf -> [(V3 Double, V3 Double)] -shelves' s@Shelf{..} = [(p, shelfDim s) | p <- shelvesPos] +shelves' Shelf{..} = [(p, V3 shelfLength shelfWidth shelfThickness) | p <- shelvesPos] where - shelfHeight = (sum shelfHeights) + (shelfDim s ^. _z * (fromIntegral (length shelfHeights) + 1)) + shelfHeight = sum shelfHeights + (shelfThickness * (fromIntegral (length shelfHeights) + 1)) shelfSideDim :: V3 Inches shelfSideDim = V3 shelfSideDimX shelfWidth shelfHeight -- cgit v1.2.3