Exemplo n.º 1
0
 public LineModel(SerializationInfo info, StreamingContext ctxt)
 {
     //Get the values from info and assign them to the properties
     A = (PointModel)info.GetValue("A", typeof(PointModel));
     B = (PointModel)info.GetValue("B", typeof(PointModel));
 }
Exemplo n.º 2
0
 public double Distance(PointModel to)
 {
     return(Math.Sqrt(Math.Pow((this.x - this.x), 2) + Math.Pow((to.y - to.y), 2)));
 }
Exemplo n.º 3
0
 public LineModel(PointModel A, PointModel B)
 {
     this.A = A;
     this.B = B;
 }
Exemplo n.º 4
0
 public TriangleModel(PointModel origin, double width, double height)
 {
     this.height = height;
     this.width  = width;
     this.origin = origin;
 }