Cleaning.
[master-thesis.git] / Parasitemia / Parasitemia / Types.fs
index a551142..e27f7d0 100644 (file)
@@ -37,6 +37,9 @@ type Ellipse (cx: float, cy: float, a: float, b: float, alpha: float) =
     member this.Perimeter =
         Math.PI * (3.0 * (this.A + this.B) - sqrt ((3.0 * this.A + this.B) * (this.A + 3.0 * this.B)))
 
+    override this.ToString () =
+        sprintf "(cx: %A, cy: %A, a: %A, b: %A, alpha: %A)" this.Cx this.Cy this.A this.B this.Alpha
+
 
 type CellClass = HealthyRBC | InfectedRBC | Peculiar
 
@@ -49,6 +52,7 @@ type Cell = {
 type Line (a: float, b: float) =
     member this.A = a
     member this.B = b
+    member this.Valid = not (Double.IsInfinity this.A)
 
 [<Struct>]
 type PointD (x: float, y: float) =