public Rect GetMediatrixEcuation(Point2D p1, Point2D p2,Rect r) { Point2D halfPoint = new Point2D((p1.x+p2.x)/2f,(p1.y+p2.y)/2f); Rational m = new Rational(r.M.denominator,r.M.numerator * -1); return new Rect(m, -1 * m.Eval() * halfPoint.x + halfPoint.y); }
public Rect(Rational M, float N) { this.M = M; this.N = N; }