#include "treeinterp.h"

typedef struct{
  int x;
  int y;
} RacPixel;

typedef struct
{
  float a;
  float b;
  float c;
} RacLine;

bool lineEquation(RacPixel &p1, RacPixel &p2, RacLine &line);
bool linesIntersection(RacLine &l1, RacLine &l2, RacPixel &pixel);
#define intersecao(l1,l2,p) e=((l1).dx*((l1).v1y-(l2).v1y)-(l1).dy*((l1).v1x-(l2).v1x))/((l1).dx*(l2).dy-(l1).dy*(l2).dx);(p)->x=e*(l2).dx+(l2).v1x;(p)->y=e*(l2).dy+(l2).v1y
#define ExtraiCoef(l,a,b) ((a) = (l.dy))*(l.v1x) + ((b) = -(l.dx))*(l.v1y)
