Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs3-19sp
project00
Commits
0ee03f20
You need to sign in or sign up before continuing.
Commit
0ee03f20
authored
5 years ago
by
Caleb C. Sander
Browse files
Options
Download
Email Patches
Plain Diff
Vector -> vector_t
parent
7f302d8a
master
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vector.h
+5
-5
vector.h
with
5 additions
and
5 deletions
+5
-5
vector.h
View file @
0ee03f20
...
@@ -14,9 +14,9 @@
...
@@ -14,9 +14,9 @@
/**
/**
* A structure to represent 2D vectors.
* A structure to represent 2D vectors.
* Note that this line declares a "struct vector" type
* Note that this line declares a "struct vector" type
* and aliases it to "
V
ector".
* and aliases it to "
v
ector
_t
".
*/
*/
typedef
struct
vector
V
ector
;
typedef
struct
vector
v
ector
_t
;
/** @brief Allocates memory for and initializes a vector
/** @brief Allocates memory for and initializes a vector
* to have x-component x and y-component y
* to have x-component x and y-component y
...
@@ -25,14 +25,14 @@ typedef struct vector Vector;
...
@@ -25,14 +25,14 @@ typedef struct vector Vector;
* @param y the y-component of the new vector
* @param y the y-component of the new vector
* @return a new vector that represents <x, y>
* @return a new vector that represents <x, y>
*/
*/
V
ector
*
vec_init
(
double
x
,
double
y
);
v
ector
_t
*
vec_init
(
double
x
,
double
y
);
/** @brief Frees the memory associated with vec
/** @brief Frees the memory associated with vec
*
*
* @param vec the vector to free
* @param vec the vector to free
* @return Void.
* @return Void.
*/
*/
void
vec_free
(
V
ector
*
vec
);
void
vec_free
(
v
ector
_t
*
vec
);
/** @brief Returns a new vector that represents the sum of v1 and v2
/** @brief Returns a new vector that represents the sum of v1 and v2
*
*
...
@@ -40,6 +40,6 @@ void vec_free(Vector *vec);
...
@@ -40,6 +40,6 @@ void vec_free(Vector *vec);
* @param v2 a vector
* @param v2 a vector
* @return a vector that represents the sum of v1 and v2
* @return a vector that represents the sum of v1 and v2
*/
*/
V
ector
*
vec_add
(
V
ector
*
v1
,
V
ector
*
v2
);
v
ector
_t
*
vec_add
(
v
ector
_t
*
v1
,
v
ector
_t
*
v2
);
#endif
#endif
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
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
Menu
Projects
Groups
Snippets
Help