Skip to content

Commit

Permalink
fix glm_ivec2|3_fill and glm_ivec2|3_eq params
Browse files Browse the repository at this point in the history
  • Loading branch information
recp committed Sep 5, 2023
1 parent e0e7e38 commit 126f809
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions docs/source/ivec2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,15 @@ Functions documentation
Returns:
distance
.. c:function:: void glm_ivec2_fill(ivec2 v, float val)
.. c:function:: void glm_ivec2_fill(ivec2 v, int val)
fill a vector with specified value
Parameters:
| *[out]* **v** vector
| *[in]* **val** value
.. c:function:: bool glm_ivec2_eq(ivec2 v, float val)
.. c:function:: bool glm_ivec2_eq(ivec2 v, int val)
check if vector is equal to value
Expand Down
4 changes: 2 additions & 2 deletions docs/source/ivec3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,15 @@ Functions documentation
Returns:
distance
.. c:function:: void glm_ivec3_fill(ivec3 v, float val)
.. c:function:: void glm_ivec3_fill(ivec3 v, int val)
fill a vector with specified value
Parameters:
| *[out]* **v** vector
| *[in]* **val** value
.. c:function:: bool glm_ivec3_eq(ivec3 v, float val)
.. c:function:: bool glm_ivec3_eq(ivec3 v, int val)
check if vector is equal to value
Expand Down
8 changes: 4 additions & 4 deletions include/cglm/ivec2.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
CGLM_INLINE void glm_ivec2_scale(ivec2 v, int s, ivec2 dest)
CGLM_INLINE int glm_ivec2_distance2(ivec2 a, ivec2 b)
CGLM_INLINE float glm_ivec2_distance(ivec2 a, ivec2 b)
CGLM_INLINE void glm_ivec2_fill(ivec2 v, float val);
CGLM_INLINE bool glm_ivec2_eq(ivec2 v, float val);
CGLM_INLINE void glm_ivec2_fill(ivec2 v, int val);
CGLM_INLINE bool glm_ivec2_eq(ivec2 v, int val);
CGLM_INLINE bool glm_ivec2_eqv(ivec2 a, ivec2 b);
CGLM_INLINE void glm_ivec2_maxv(ivec2 a, ivec2 b, ivec2 dest)
CGLM_INLINE void glm_ivec2_minv(ivec2 a, ivec2 b, ivec2 dest)
Expand Down Expand Up @@ -215,7 +215,7 @@ glm_ivec2_distance(ivec2 a, ivec2 b) {
*/
CGLM_INLINE
void
glm_ivec2_fill(ivec2 v, float val) {
glm_ivec2_fill(ivec2 v, int val) {
v[0] = v[1] = val;
}

Expand All @@ -227,7 +227,7 @@ glm_ivec2_fill(ivec2 v, float val) {
*/
CGLM_INLINE
bool
glm_ivec2_eq(ivec2 v, float val) {
glm_ivec2_eq(ivec2 v, int val) {
return v[0] == val && v[0] == v[1];
}

Expand Down
8 changes: 4 additions & 4 deletions include/cglm/ivec3.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
CGLM_INLINE void glm_ivec3_scale(ivec3 v, int s, ivec3 dest)
CGLM_INLINE int glm_ivec3_distance2(ivec3 a, ivec3 b)
CGLM_INLINE float glm_ivec3_distance(ivec3 a, ivec3 b)
CGLM_INLINE void glm_ivec3_fill(ivec3 v, float val);
CGLM_INLINE bool glm_ivec3_eq(ivec3 v, float val);
CGLM_INLINE void glm_ivec3_fill(ivec3 v, int val);
CGLM_INLINE bool glm_ivec3_eq(ivec3 v, int val);
CGLM_INLINE bool glm_ivec3_eqv(ivec3 a, ivec3 b);
CGLM_INLINE void glm_ivec3_maxv(ivec3 a, ivec3 b, ivec3 dest)
CGLM_INLINE void glm_ivec3_minv(ivec3 a, ivec3 b, ivec3 dest)
Expand Down Expand Up @@ -223,7 +223,7 @@ glm_ivec3_distance(ivec3 a, ivec3 b) {
*/
CGLM_INLINE
void
glm_ivec3_fill(ivec3 v, float val) {
glm_ivec3_fill(ivec3 v, int val) {
v[0] = v[1] = v[2] = val;
}

Expand All @@ -235,7 +235,7 @@ glm_ivec3_fill(ivec3 v, float val) {
*/
CGLM_INLINE
bool
glm_ivec3_eq(ivec3 v, float val) {
glm_ivec3_eq(ivec3 v, int val) {
return v[0] == val && v[0] == v[1] && v[0] == v[2];
}

Expand Down
4 changes: 2 additions & 2 deletions src/ivec2.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,13 @@ glmc_ivec2_distance(ivec2 a, ivec2 b) {

CGLM_EXPORT
void
glmc_ivec2_fill(ivec2 v, float val) {
glmc_ivec2_fill(ivec2 v, int val) {
glm_ivec2_fill(v, val);
}

CGLM_EXPORT
bool
glmc_ivec2_eq(ivec2 v, float val) {
glmc_ivec2_eq(ivec2 v, int val) {
return glm_ivec2_eq(v, val);
}

Expand Down
4 changes: 2 additions & 2 deletions src/ivec3.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,13 @@ glmc_ivec3_distance(ivec3 a, ivec3 b) {

CGLM_EXPORT
void
glmc_ivec3_fill(ivec3 v, float val) {
glmc_ivec3_fill(ivec3 v, int val) {
glm_ivec3_fill(v, val);
}

CGLM_EXPORT
bool
glmc_ivec3_eq(ivec3 v, float val) {
glmc_ivec3_eq(ivec3 v, int val) {
return glm_ivec3_eq(v, val);
}

Expand Down

0 comments on commit 126f809

Please sign in to comment.