Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Srb František
Cpp-Game
Commits
7a472225
Commit
7a472225
authored
Jul 13, 2021
by
Srb František
Browse files
Fix
#6
parent
b1568439
Changes
1
Show whitespace changes
Inline
Side-by-side
CppGame/Line.h
View file @
7a472225
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment