// Triangle class for Sierpinski Lab // Author: Chris Wilcox // Date: 11/3/2016 // Class: CS163/CS164 // Email: wilcox@cs.colostate.edu public class Triangle { // Coordinate values in a 2D space. public double x0, y0; public double x1, y1; public double x2, y2; // Triangle constructor public Triangle(double x0, double y0, double x1, double y1, double x2, double y2) { this.x0 = x0; this.y0 = y0; this.x1 = x1; this.y1 = y1; this.x2 = x2; this.y2 = y2; } // Triangle constructor public String toString() { return String.format("Triangle(%.5f,%.5f,%.5f,%.5f,%.5f,%.5f", x0, y0, x1, y1, x2, y2)+")"; } }