ivec4 — cglm 0.9.6 documentation

# ivec4

Header: cglm/ivec4.h

## Table of contents (click to go):

Macros:

1. GLM_IVEC4_ONE_INIT

2. GLM_IVEC4_ZERO_INIT

3. GLM_IVEC4_ONE

4. GLM_IVEC4_ZERO

Functions:

1. `glm_ivec4()`

2. `glm_ivec4_copy()`

3. `glm_ivec4_zero()`

4. `glm_ivec4_one()`

5. `glm_ivec4_add()`

6. `glm_ivec4_adds()`

7. `glm_ivec4_sub()`

8. `glm_ivec4_subs()`

9. `glm_ivec4_mul()`

10. `glm_ivec4_scale()`

11. `glm_ivec4_distance2()`

12. `glm_ivec4_distance()`

13. `glm_ivec4_maxv()`

14. `glm_ivec4_minv()`

15. `glm_ivec4_clamp()`

16. `glm_ivec4_abs()`

## Functions documentation

void glm_ivec4(ivec3 v3, int last, ivec4 dest)

  init ivec4 using ivec3

  Parameters:
    [in] v vector
    [out] dest destination

void glm_ivec4_copy(ivec4 a, ivec4 dest)

  copy all members of [a] to [dest]

  Parameters:
    [in] a source vector
    [out] dest destination

void glm_ivec4_zero(ivec4 v)

  set all members of [v] to zero

  Parameters:
    [out] v vector

void glm_ivec4_one(ivec4 v)

  set all members of [v] to one

  Parameters:
    [out] v vector

void glm_ivec4_add(ivec4 a, ivec4 b, ivec4 dest)

  add vector [a] to vector [b] and store result in [dest]

  Parameters:
    [in] a first vector
    [in] b second vector
    [out] dest destination

void glm_ivec4_adds(ivec4 v, int s, ivec4 dest)

  add scalar s to vector [v] and store result in [dest]

  Parameters:
    [in] v vector
    [in] s scalar
    [out] dest destination

void glm_ivec4_sub(ivec4 a, ivec4 b, ivec4 dest)

  subtract vector [b] from vector [a] and store result in [dest]

  Parameters:
    [in] a first vector
    [in] b second vector
    [out] dest destination

void glm_ivec4_subs(ivec4 v, int s, ivec4 dest)

  subtract scalar s from vector [v] and store result in [dest]

  Parameters:
    [in] v vector
    [in] s scalar
    [out] dest destination

void glm_ivec4_mul(ivec4 a, ivec4 b, ivec4 dest)

  multiply vector [a] with vector [b] and store result in [dest]

  Parameters:
    [in] a first vector
    [in] b second vector
    [out] dest destination

void glm_ivec4_scale(ivec4 v, int s, ivec4 dest)

  multiply vector [a] with scalar s and store result in [dest]

  Parameters:
    [in] v vector
    [in] s scalar
    [out] dest destination

int glm_ivec4_distance2(ivec4 a, ivec4 b)

  squared distance between two vectors

  Parameters:
    [in] a first vector
    [in] b second vector
  Returns:

    squared distance (distance * distance)

float glm_ivec4_distance(ivec4 a, ivec4 b)

  distance between two vectors

  Parameters:
    [in] a first vector
    [in] b second vector
  Returns:

    distance

void glm_ivec4_maxv(ivec4 a, ivec4 b, ivec4 dest)

  set each member of dest to greater of vector a and b

  Parameters:
    [in] a first vector
    [in] b second vector
    [out] dest destination

void glm_ivec4_minv(ivec4 a, ivec4 b, ivec4 dest)

  set each member of dest to lesser of vector a and b

  Parameters:
    [in] a first vector
    [in] b second vector
    [out] dest destination

void glm_ivec4_clamp(ivec4 v, int minVal, int maxVal)

  clamp each member of [v] between minVal and maxVal (inclusive)

  Parameters:
    [in, out] v vector
    [in] minVal minimum value
    [in] maxVal maximum value

void glm_ivec4_abs(ivec4 v, ivec4 dest)

  absolute value of each vector item

  Parameters:
    [in] v vector
    [out] dest destination vector