Gl Graph

Gl Graph Source of line.h


#ifndef LINES_H
#define LINES_H
#include<drawabledata.h>
#include <algorithm>
 
class Line : public DrawableData {
 
private:
 
 
 
public:
    double X1;
    double Y1;
    double X2;
    double Y2;
 
    Line(double X1, double Y1, double X2, double Y2) {
        this->X1 = X1;
        this->Y1 = Y1;
        this->X2 = X2;
        this->Y2 = Y2;
    };
    void draw();
 
    void init() {
 
    };
 
    float getMinX() {
        return std::min(X1, X2);
    };
 
    float getMaxX() {
        return std::max(X1, X2);
    };
 
    float getMinY() {
        return std::min(Y1, Y2);
    };
 
    float getMaxY() {
        return std::max(Y1, Y2);
    };
 
};
 
#endif