Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1.  
  2. dimen :: X Caixa Tipo -> (Float, Float)
  3. dimen (Unid c) = (fromIntegral (p1(p1(c))),fromIntegral (p2(p1(c))))
  4. dimen (Comp t c c2)
  5. | t==Ve = ( max (p1 (dimen c)) (p1 (dimen c2)) , (p2 (dimen c)) + (p2 (dimen c2)) )
  6. | t==H = ( (p1 (dimen c)) + (p1 (dimen c2)) , max (p2 (dimen c)) (p2 (dimen c2) + ((p2 (dimen c))/2)) )
  7. | t==Hb = ( (p1 (dimen c)) + (p1 (dimen c2)) , max (p2 (dimen c)) (p2 (dimen c2)) )
  8. | (t==Ht || t==Vd) = ( (p1 (dimen c)) + (p1 (dimen c2)) , (p2 (dimen c)) + (p2 (dimen c2)) )
  9. | 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