public Triangle2D(params Vector2D[] ps)
{
points = new Vector2D[3];
double min = double.MaxValue;
double max = double.MinValue;
for (int i=0;i<ps.Length && i < 3;i++){
points[i] = ps[i];
min = System.Math.Min(min, ps[i].x);
max = System.Math.Max(max, ps[i].x);
}
if (ps.Length==0){
min = 0;
max = 0;
}
}