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)); }
public double Distance(PointModel to) { return(Math.Sqrt(Math.Pow((this.x - this.x), 2) + Math.Pow((to.y - to.y), 2))); }
public LineModel(PointModel A, PointModel B) { this.A = A; this.B = B; }
public TriangleModel(PointModel origin, double width, double height) { this.height = height; this.width = width; this.origin = origin; }