Commit 7a472225 authored by Srb František's avatar Srb František
Browse files

Fix #6

parent b1568439
...@@ -12,7 +12,7 @@ public: ...@@ -12,7 +12,7 @@ public:
Line(float x1, float y1, float x2, float y2); Line(float x1, float y1, float x2, float y2);
Line(float x1,float y1,float x2, float y2,tuple_color color1, tuple_color color2); Line(float x1,float y1,float x2, float y2,tuple_color color1, tuple_color color2);
static Line normalize(int x1, int y1, int x2, int y2,int width,int height,tuple_color color1, tuple_color color2); static Line normalize(int x1, int y1, int x2, int y2,int width,int height,tuple_color color1, tuple_color color2);
float length() { float length() const {
float dx = x1 - x2; float dx = x1 - x2;
float dy = y1 - y2; float dy = y1 - y2;
return sqrt(dx * dx + dy * dy); return sqrt(dx * dx + dy * dy);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment