X-Git-Url: https://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FCube.hs;h=78c5ec21e266a2cc33308bd23a98e67c96577673;hb=a5c2a06421f9faf2c58831f1ac296bc6b8e7e040;hp=53bf10547ccd67297f2ba0f2ff83861090ac681d;hpb=28710758dac0a1241911c6ba296b0685b877b5e3;p=spline3.git diff --git a/src/Cube.hs b/src/Cube.hs index 53bf105..78c5ec2 100644 --- a/src/Cube.hs +++ b/src/Cube.hs @@ -18,14 +18,19 @@ data Cube = Cube { h :: Double, instance Show Cube where show c = - "Cube_" ++ (show (i c)) ++ "," ++ (show (j c)) ++ "," ++ (show (k c)) ++ - " (Center: " ++ (show (center c)) ++ ")" ++ - " (xmin: " ++ (show (xmin c)) ++ ")" ++ - " (xmax: " ++ (show (xmax c)) ++ ")" ++ - " (ymin: " ++ (show (ymin c)) ++ ")" ++ - " (ymax: " ++ (show (ymax c)) ++ ")" ++ - " (zmin: " ++ (show (zmin c)) ++ ")" ++ - " (zmax: " ++ (show (zmax c)) ++ ")" + "Cube_" ++ subscript ++ "\n" ++ + " h: " ++ (show (h c)) ++ "\n" ++ + " Center: " ++ (show (center c)) ++ "\n" ++ + " xmin: " ++ (show (xmin c)) ++ "\n" ++ + " xmax: " ++ (show (xmax c)) ++ "\n" ++ + " ymin: " ++ (show (ymin c)) ++ "\n" ++ + " ymax: " ++ (show (ymax c)) ++ "\n" ++ + " zmin: " ++ (show (zmin c)) ++ "\n" ++ + " zmax: " ++ (show (zmax c)) ++ "\n" + where + subscript = + (show (i c)) ++ "," ++ (show (j c)) ++ "," ++ (show (k c)) + empty_cube :: Cube empty_cube = Cube 0 0 0 0 empty_values