Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dimen :: X Caixa Tipo -> (Float, Float)
- dimen (Unid c) = (fromIntegral (p1(p1(c))),fromIntegral (p2(p1(c))))
- dimen (Comp t c c2)
- | t==Ve = ( max (p1 (dimen c)) (p1 (dimen c2)) , (p2 (dimen c)) + (p2 (dimen c2)) )
- | t==H = ( (p1 (dimen c)) + (p1 (dimen c2)) , max (p2 (dimen c)) (p2 (dimen c2) + ((p2 (dimen c))/2)) )
- | t==Hb = ( (p1 (dimen c)) + (p1 (dimen c2)) , max (p2 (dimen c)) (p2 (dimen c2)) )
- | (t==Ht || t==Vd) = ( (p1 (dimen c)) + (p1 (dimen c2)) , (p2 (dimen c)) + (p2 (dimen c2)) )
- | t==V = ( max (p1 (dimen c)) (p1 (dimen c2) + ((p1 (dimen c))/2)) , (p2 (dimen c)) + (p2 (dimen c2)) )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement